github-actions[bot] commented on code in PR #64009:
URL: https://github.com/apache/doris/pull/64009#discussion_r3460448817


##########
fe/fe-filesystem/fe-filesystem-spi/src/main/java/org/apache/doris/filesystem/spi/S3CompatibleFileSystem.java:
##########
@@ -907,6 +924,247 @@ private static String expandNumericRanges(String pattern) 
{
         return sb.toString();
     }
 
+    private static boolean isDeterministicObjectKeyPattern(String pattern) {
+        if (pattern.isEmpty() || pattern.endsWith(DIR_MARKER_SUFFIX)) {

Review Comment:
   The deterministic HEAD path still excludes escaped wildcard literals. 
`globToRegex()` treats `\X` as an escape, and the existing 
`globToRegex_escapedSpecialChars` test verifies that `file\\*.csv` means the 
literal key `file*.csv`, not the wildcard pattern `filea.csv`. With this 
`pattern.indexOf('\\') >= 0` guard, that finite key always falls back to 
`ListObjects` (with the prefix truncated at the backslash by 
`longestNonGlobPrefix`), so credentials that can `HeadObject`/`GetObject` 
`dir/file*.csv` but cannot `ListBucket` still fail. Please handle escaped 
metacharacters in the deterministic expander by unescaping them before HEADing 
the concrete key, and only fall back for malformed/trailing escapes or 
genuinely non-deterministic patterns.



-- 
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