Skip to content

[fix](fe) Select S3 storage for cloud plugin downloads - #66695

Open
CalvinKirs wants to merge 1 commit into
apache:branch-4.1from
CalvinKirs:fix-cloud-plugin-download-branch-4.1-agent
Open

[fix](fe) Select S3 storage for cloud plugin downloads#66695
CalvinKirs wants to merge 1 commit into
apache:branch-4.1from
CalvinKirs:fix-cloud-plugin-download-branch-4.1-agent

Conversation

@CalvinKirs

@CalvinKirs CalvinKirs commented Aug 12, 2026

Copy link
Copy Markdown
Member

What problem does this PR solve?

Problem Summary: In Cloud SaaS mode, a JDBC catalog or Java UDF using a bare jar name downloads the file from the instance object store. StorageProperties.createAll() now prepends a default HDFS entry, while CloudPluginDownloader selected the first entry and cast it to AbstractS3CompatibleProperties. The cast therefore failed with ClassCastException before the download. This change selects the first explicitly S3-compatible property by type and fails clearly if none exists. Tests cover default-HDFS ordering, all current S3-compatible property implementations, and the missing-compatible-storage path.

Release note

Fix automatic JDBC driver and Java UDF jar downloads from Cloud SaaS object storage when the plugin is referenced by a bare file name.

Check List (For Author)

  • Test: Unit Test (environment blocked)
    • MAVEN_OPTS="-Xmx4g -XX:MaxMetaspaceSize=1g" FE_UT_PARALLEL=1 ./run-fe-ut.sh --run org.apache.doris.common.plugin.CloudPluginDownloaderTest completed Checkstyle, FE main compilation, and test compilation. All 9 tests were blocked in the existing Mockito setup because Byte Buddy cannot self-attach to the current JDK; there were no assertion failures.
  • Behavior changed: Yes (Cloud SaaS plugin downloads select S3-compatible storage instead of the prepended default HDFS entry)
  • Does this need documentation: No

### What problem does this PR solve?

Issue Number: None

Related PR: apache#58968

Problem Summary: Cloud SaaS JDBC catalogs that reference a driver by bare file name download it from the instance object store. StorageProperties.createAll now places its default HDFS properties first, but CloudPluginDownloader selected the first entry and cast it to AbstractS3CompatibleProperties, causing a ClassCastException before the driver could be downloaded. Select the first actual S3-compatible properties by type instead of list position, and fail explicitly when no compatible object storage is available.

### Release note

Fix automatic JDBC driver and Java UDF jar downloads from Cloud SaaS instance object storage.

### Check List (For Author)

- Test: Unit Test
    - MAVEN_OPTS="-Xmx4g -XX:MaxMetaspaceSize=1g" FE_UT_PARALLEL=1 ./run-fe-ut.sh --run org.apache.doris.common.plugin.CloudPluginDownloaderTest (production and test sources compiled; 9 tests discovered, but execution was blocked by the existing Mockito inline MockMaker because Byte Buddy could not self-attach to this JDK)
- Behavior changed: Yes (cloud plugin downloads now select S3-compatible properties even when default HDFS properties are first)
- Does this need documentation: No
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@CalvinKirs CalvinKirs closed this Aug 12, 2026
@CalvinKirs CalvinKirs reopened this Aug 12, 2026
@CalvinKirs

Copy link
Copy Markdown
Member Author

run buildall

@CalvinKirs
CalvinKirs marked this pull request as ready for review August 12, 2026 10:18
@CalvinKirs
CalvinKirs requested a review from yiguolei as a code owner August 12, 2026 10:18
@CalvinKirs

Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 83.33% (5/6) 🎉
Increment coverage report
Complete coverage report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants