You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by et...@apache.org on 2025/05/23 12:56:41 UTC

(iceberg) branch main updated: AWS: Skip cleanup of analytics accelerator when disabled (#13134)

This is an automated email from the ASF dual-hosted git repository.

etudenhoefner pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/main by this push:
     new 793f6cd062 AWS: Skip cleanup of analytics accelerator when disabled (#13134)
793f6cd062 is described below

commit 793f6cd062c75cc72f6ae6e42840d290cb1b68f0
Author: Devin Smith <de...@deephaven.io>
AuthorDate: Fri May 23 05:56:36 2025 -0700

    AWS: Skip cleanup of analytics accelerator when disabled (#13134)
    
    If an S3AsyncClient has been used from S3FileIO and the analytics accelerator is disabled (is disabled by default), the S3FileIO may throw an exception during closing if the analytics accelerator is not on the classpath.
---
 aws/src/main/java/org/apache/iceberg/aws/s3/PrefixedS3Client.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/aws/src/main/java/org/apache/iceberg/aws/s3/PrefixedS3Client.java b/aws/src/main/java/org/apache/iceberg/aws/s3/PrefixedS3Client.java
index b0b65ab8ea..400792cf97 100644
--- a/aws/src/main/java/org/apache/iceberg/aws/s3/PrefixedS3Client.java
+++ b/aws/src/main/java/org/apache/iceberg/aws/s3/PrefixedS3Client.java
@@ -114,7 +114,9 @@ class PrefixedS3Client implements AutoCloseable {
 
     if (null != s3AsyncClient) {
       // cleanup usage in analytics accelerator if any
-      AnalyticsAcceleratorUtil.cleanupCache(s3AsyncClient, s3FileIOProperties);
+      if (s3FileIOProperties().isS3AnalyticsAcceleratorEnabled()) {
+        AnalyticsAcceleratorUtil.cleanupCache(s3AsyncClient, s3FileIOProperties);
+      }
       s3AsyncClient.close();
     }
   }