github-actions[bot] commented on code in PR #65034:
URL: https://github.com/apache/doris/pull/65034#discussion_r3503679831
##########
fe/fe-core/src/main/java/org/apache/doris/fs/SpiSwitchingFileSystem.java:
##########
@@ -114,69 +114,91 @@ public FileSystem forLocation(Location location) throws
IOException {
@Override
public boolean exists(Location location) throws IOException {
- return forLocation(location).exists(location);
+ Location normalizedLocation = normalizeLocation(location);
+ return forLocation(normalizedLocation).exists(normalizedLocation);
Review Comment:
The delegate needs to be selected from the same storage properties that
normalized the original URI. With a catalog that has both OSS and S3 enabled,
an input like `oss://bucket.oss-cn-beijing.aliyuncs.com/key` is normalized to
`s3://bucket/key`, and this line then calls `forLocation` on the normalized
path. `forPath` reparses `s3://...`, `LocationPath.findStorageProperties` takes
the direct `StorageProperties.Type.S3` map entry first, and the operation runs
with the S3 endpoint/credentials even though the original URI matched OSS.
`StoragePropertiesTest.testMultipleExplicitSupport_onlyFlaggedProvidersMatched`
shows an OSS+S3 storage map is a supported configuration. Please carry the
`StorageProperties` selected for the original location through
normalization/delegate creation, or otherwise avoid reselecting by the
normalized `s3://` scheme.
--
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]