You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "jackye1995 (via GitHub)" <gi...@apache.org> on 2023/03/10 00:02:56 UTC

[GitHub] [iceberg] jackye1995 commented on a diff in pull request #7046: AWS: Prevent creating refresh executor when token refresh is disabled

jackye1995 commented on code in PR #7046:
URL: https://github.com/apache/iceberg/pull/7046#discussion_r1131778315


##########
aws/src/main/java/org/apache/iceberg/aws/s3/signer/S3V4RestSignerClient.java:
##########
@@ -113,6 +113,20 @@ boolean keepTokenRefreshed() {
         OAuth2Properties.TOKEN_REFRESH_ENABLED_DEFAULT);
   }
 
+  @Nullable
+  private ScheduledExecutorService tokenRefreshExecutor() {
+    if (!keepTokenRefreshed()) {
+      return null;
+    }
+
+    if (null == TOKEN_REFRESH_EXECUTOR.get()) {
+      TOKEN_REFRESH_EXECUTOR.compareAndSet(

Review Comment:
   should this be in synchronous block?



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org