Gabriel39 opened a new pull request, #71032:
URL: https://github.com/apache/doris/pull/71032

   ### Background
   
   Iceberg REST catalogs can vend separate storage credentials for different 
object-path prefixes. The Google SDK selects the longest matching prefix and 
keeps the last credential when a prefix is repeated. Doris chooses between 
Hadoop and native SDK GCS FileIO before the SDK opens an object.
   
   ### What problem does this PR solve?
   
   Issue Number: None
   Related PR: #70980 (introduced the release compatibility predicate), #71031 
(master fix)
   PR Type: Bugfix
   
   Problem Summary:
   
   The compatibility resolver considers every matching credential, including a 
broader or earlier duplicate that the SDK will discard. A broad prefix 
containing `gcs.*` and a narrower prefix without SDK options can therefore 
select a different authentication path from the effective credential 
configuration. Match SDK prefix precedence while preserving global SDK options 
and all non-GCS routes.
   
   ### Details
   
   - **Frequency:** Always for the reproduced overlapping-prefix and 
duplicate-prefix configurations.
   - **Root cause:** `NativeGcsResolvingFileIO` uses `anyMatch`, but the SDK 
deduplicates credentials and uses only the longest matching prefix.
   - **Why existing tests missed it:** `IcebergGcsSdkOptionsTest` checks one 
credential at a time. Existing SQL GCS/system-table suites do not supply 
overlapping or repeated credential prefixes.
   - **Fix:** Select the longest match, retaining the last duplicate, and 
inspect only its SDK options when no global SDK option exists. No serialized 
fields, dependencies or SDK versions change.
   - **Other paths and branches:** Master is fixed in #71031. SDK 1.11.0 and 
1.10.1 share the rule; corresponding release backports receive the same 
correction separately. Custom/native choices, non-GCS routing and global 
options are unchanged.
   
   ### Testing
   
   - Unfixed branch-4.2 at `0c3de8ca05`: the new regression fails by assertion, 
with no errors or skips.
   - Branch-local SDK-option, routing-compatibility and REST GCS FileIO suites 
passed:77 fresh tests, zero failures/errors/skips.
   - Twelve serialized combinations cover overlapping prefixes, ordering, 
duplicates and global SDK options.
   
   ### Notes for Reviewers
   
   Local full self-review and required FE Checkstyle passed. No 
package/dependency contract changed; live cloud/rolling-upgrade execution was 
not run. Deploy the updated compatibility class on both FE and BE.
   
   ### Release note
   
   Fix Iceberg GCS FileIO selection when vended storage credential prefixes 
overlap or repeat.
   
   ### Check List (For Author)
   
   - Behavior changed: No
   - Does this need documentation: No
   - Pre-submission status: Ready
   
   ### AI Disclosure
   
   - Tool: Codex (GPT-6)
   - Generated: Code, tests and this description
   - Human review: not stated
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to