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

   ### Background
   
   S3 table-valued functions pass object storage connection settings to BE.
   BE uses the S3 client from the AWS C++ SDK to fetch object data.
   
   ### What problem does this PR solve?
   
   Issue Number: None
   Related PR: #70443 (shared S3 client implementation)
   PR Type: Bugfix
   
   Problem Summary:
   
   The default SDK transport follows HTTP redirects during BE S3 requests.
   A storage server can redirect requests to another destination. BE now 
disables automatic transport redirects by default. Deployments that rely on 
redirects can opt in through a startup setting.
   
   ### Details
   
   - **Frequency:** Not observed in a running cluster. Found by code inspection 
when reviewing the default redirect policy.
   - **Root cause:** BE leaves the shared S3 client on the AWS SDK HTTP 
redirect default.
   - **Why existing tests missed it:** The client factory test verifies HTTP 
scheme selection. The S3 TVF regression suite reads from its configured storage 
endpoint. These tests do not assert the SDK redirect policy.
   - **Fix:** Pass the BE startup setting through the connection configuration 
and use the SDK's NEVER policy by default. Include the setting in client cache 
identity. The SDK still handles its own region correction.
   - **Other paths and branches:** The BE setting applies to its S3-compatible 
clients that use the AWS S3 SDK. Cloud Recycler and Azure retain their existing 
behavior. The local 3.1, 4.0, 4.1, and 4.2 release refs use the older S3 client 
factory and require separate backport adaptations.
   - **Configs and defaults:** `s3_client_follow_redirects` defaults to `false` 
and takes effect at BE startup. Setting it to `true` restores the SDK's default 
HTTP redirect policy.
   - **Behavior change:** Deployments that rely on automatic HTTP redirects 
need the final endpoint or an explicit opt-in.
   
   ### Testing
   
   Added `S3ClientFactoryTest.BeS3HttpRedirectPolicy` to verify the default and 
opt-in policies. The test is included in the BE unit test suite. Local 
execution stopped during submodule setup, before the test could run.
   
   ### Release note
   
   BE S3 clients disable transport-level HTTP redirects by default. Deployments
   that require automatic redirects can use their final S3 endpoint directly
   or set `s3_client_follow_redirects=true` in `be.conf` and restart BE.
   
   ### Check List (For Author)
   
   - Behavior changed: Yes (see Details)
   - Does this need documentation: Yes. Document the setting and default in the 
BE configuration reference.
   - Pre-submission status: Partially verified: BE build, unit test, and 
clang-tidy are pending.
   
   ### AI Disclosure
   
   - Tool: Codex (GPT-6)
   - Generated: Code, unit test, and 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