github-actions[bot] commented on code in PR #68879:
URL: https://github.com/apache/doris/pull/68879#discussion_r4255942071
##########
fe/fe-filesystem/fe-filesystem-obs/src/main/java/org/apache/doris/filesystem/obs/ObsFileSystemProperties.java:
##########
@@ -392,6 +392,11 @@ private void normalize() {
if (StringUtils.isBlank(region) && StringUtils.isNotBlank(endpoint)) {
region = extractRegion(endpoint).orElse("");
}
+ // The endpoint is a DNS host, so normalise the letter case: an
upper/mixed case spelling must
+ // yield exactly the same effective endpoint as the lowercase one. The
pinned 3.21.11 esdk SDK
+ // strips only a lowercase http:// / https:// prefix and then parses
everything after the last
+ // colon as a port, so an upper case scheme throws
NumberFormatException before the first call.
+ endpoint = endpoint.toLowerCase(Locale.ROOT);
Review Comment:
[P2] Preserve URL paths when normalizing COS/OBS endpoints
For `INTO OUTFILE 's3://bucket/result'` with `fs.obs.support=true`,
`obs.endpoint=https://gateway.internal/Proxy`, `obs.region=cn-north-4`,
`obs.use_path_style=true`, and paired OBS credentials, binding succeeds but
this folds `/Proxy` to `/proxy`. `OutFileClause` exports this as `AWS_ENDPOINT`
to the BE S3 client; the [pinned SDK's custom-endpoint
rules](https://github.com/aws/aws-sdk-cpp/blob/1.11.221/generated/src/aws-cpp-sdk-s3/source/S3EndpointRules.cpp)
preserve base paths, so export now targets `/proxy/bucket/...` instead of
`/Proxy/bucket/...`, failing on a case-sensitive gateway or writing to a
different namespace. The base revision preserved the configured path, and COS
has the same whole-value fold. Lowercase only the scheme and host, and cover
mixed-case path preservation in the exported backend properties.
--
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]