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

yihua pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new 86c5c8151cd5 fix: disable retries in s3/gcs storage lock clients for 
storage based LP (#17869)
86c5c8151cd5 is described below

commit 86c5c8151cd5c2fce30f5ad5242f8ed7e3fbb27b
Author: Alex R <[email protected]>
AuthorDate: Thu Feb 5 13:47:57 2026 -0800

    fix: disable retries in s3/gcs storage lock clients for storage based LP 
(#17869)
---
 .../hudi/aws/transaction/lock/S3StorageLockClient.java     |  5 +++--
 .../hudi/gcp/transaction/lock/GCSStorageLockClient.java    | 14 +++++++++++---
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git 
a/hudi-aws/src/main/java/org/apache/hudi/aws/transaction/lock/S3StorageLockClient.java
 
b/hudi-aws/src/main/java/org/apache/hudi/aws/transaction/lock/S3StorageLockClient.java
index 4a6fa605581d..10af6c30d2f7 100644
--- 
a/hudi-aws/src/main/java/org/apache/hudi/aws/transaction/lock/S3StorageLockClient.java
+++ 
b/hudi-aws/src/main/java/org/apache/hudi/aws/transaction/lock/S3StorageLockClient.java
@@ -244,10 +244,11 @@ public class S3StorageLockClient implements 
StorageLockClient {
   }
 
   private static S3Client createS3Client(Region region, long timeoutSecs, 
Properties props) {
-    // Set the timeout, credentials, and region
+    // Set the timeout, credentials, and region with no retries
     return S3Client.builder()
         .overrideConfiguration(
-            b -> b.apiCallTimeout(Duration.ofSeconds(timeoutSecs)))
+            b -> b.apiCallTimeout(Duration.ofSeconds(timeoutSecs))
+                  .retryStrategy(r -> r.maxAttempts(1)))
         
.credentialsProvider(HoodieAWSCredentialsProviderFactory.getAwsCredentialsProvider(props))
         .region(region).build();
   }
diff --git 
a/hudi-gcp/src/main/java/org/apache/hudi/gcp/transaction/lock/GCSStorageLockClient.java
 
b/hudi-gcp/src/main/java/org/apache/hudi/gcp/transaction/lock/GCSStorageLockClient.java
index cd7f665ad8f5..123b76bb6926 100644
--- 
a/hudi-gcp/src/main/java/org/apache/hudi/gcp/transaction/lock/GCSStorageLockClient.java
+++ 
b/hudi-gcp/src/main/java/org/apache/hudi/gcp/transaction/lock/GCSStorageLockClient.java
@@ -29,6 +29,7 @@ import org.apache.hudi.common.util.VisibleForTesting;
 import org.apache.hudi.common.util.collection.Pair;
 import org.apache.hudi.exception.HoodieIOException;
 
+import com.google.api.gax.retrying.RetrySettings;
 import com.google.cloud.storage.Blob;
 import com.google.cloud.storage.BlobId;
 import com.google.cloud.storage.BlobInfo;
@@ -98,9 +99,16 @@ public class GCSStorageLockClient implements 
StorageLockClient {
 
   private static Functions.Function1<Properties, Storage> 
createDefaultGcsClient() {
     return (props) -> {
-      // Provide the option to customize the timeouts later on.
-      // For now, defaults suffice
-      return StorageOptions.newBuilder().build().getService();
+      // Configure with no retries - only one attempt per operation
+      RetrySettings retrySettings =
+          StorageOptions.getDefaultRetrySettings()
+              .toBuilder()
+              .setMaxAttempts(1)
+              .build();
+      return StorageOptions.newBuilder()
+          .setRetrySettings(retrySettings)
+          .build()
+          .getService();
     };
   }
 

Reply via email to