gianm commented on code in PR #19180:
URL: https://github.com/apache/druid/pull/19180#discussion_r2961163127


##########
cloud/aws-common/src/main/java/org/apache/druid/common/aws/AWSClientConfig.java:
##########
@@ -67,11 +77,24 @@ public boolean isEnablePathStyleAccess()
     return enablePathStyleAccess;
   }
 
-  public boolean isForceGlobalBucketAccessEnabled()
+  /**
+   * @deprecated Use {@link #isCrossRegionAccessEnabled()} instead.
+   */
+  @Deprecated
+  @Nullable
+  public Boolean isForceGlobalBucketAccessEnabled()
   {
     return forceGlobalBucketAccessEnabled;
   }
 
+  public boolean isCrossRegionAccessEnabled()
+  {
+    if (forceGlobalBucketAccessEnabled != null) {

Review Comment:
   `crossRegionAccessEnabled`, if set, should take precedence over 
`forceGlobalBucketAccessEnabled` because the latter is deprecated.



##########
docs/development/extensions-core/s3.md:
##########
@@ -129,7 +129,8 @@ For example, to set the region to 'us-east-1' through 
system properties:
 |`druid.s3.protocol`|Communication protocol type to use when sending requests 
to AWS. `http` or `https` can be used. This configuration would be ignored if 
`druid.s3.endpoint.url` is filled with a URL with a different protocol.|`https`|
 |`druid.s3.disableChunkedEncoding`|Disables chunked encoding. See [AWS 
document](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/AmazonS3Builder.html#disableChunkedEncoding--)
 for details.|false|
 |`druid.s3.enablePathStyleAccess`|Enables path style access. See [AWS 
document](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/AmazonS3Builder.html#enablePathStyleAccess--)
 for details.|false|
-|`druid.s3.forceGlobalBucketAccessEnabled`|Enables global bucket access. See 
[AWS 
document](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/AmazonS3Builder.html#setForceGlobalBucketAccessEnabled-java.lang.Boolean-)
 for details.|false|
+|`druid.s3.crossRegionAccessEnabled`|Enables cross-region access for S3 
requests. When enabled, the S3 client automatically detects the correct region 
for a bucket on first access and caches it for subsequent requests.|false|
+|`druid.s3.forceGlobalBucketAccessEnabled`|**Deprecated.** Use 
`druid.s3.crossRegionAccessEnabled` instead. If explicitly set, this takes 
precedence over `crossRegionAccessEnabled`.|null|

Review Comment:
   "this takes precedence" <- mentioned this elsewhere but IMO these should be 
flipped.



##########
cloud/aws-common/src/main/java/org/apache/druid/common/aws/AWSClientConfig.java:
##########
@@ -94,7 +117,7 @@ public String toString()
            "protocol='" + protocol + '\'' +
            ", disableChunkedEncoding=" + disableChunkedEncoding +
            ", enablePathStyleAccess=" + enablePathStyleAccess +
-           ", forceGlobalBucketAccessEnabled=" + 
forceGlobalBucketAccessEnabled +

Review Comment:
   Should include `forceGlobalBucketAccessEnabled`, even though it's deprecated 
it still exists for now.



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