diff --git a/servers/quarkus-common/src/main/java/org/projectnessie/quarkus/config/QuarkusBigTableConfig.java b/servers/quarkus-common/src/main/java/org/projectnessie/quarkus/config/QuarkusBigTableConfig.java index ecb85b0cac9..07462108ab4 100644 --- a/servers/quarkus-common/src/main/java/org/projectnessie/quarkus/config/QuarkusBigTableConfig.java +++ b/servers/quarkus-common/src/main/java/org/projectnessie/quarkus/config/QuarkusBigTableConfig.java @@ -46,8 +46,12 @@ public interface QuarkusBigTableConfig { Optional maxRetryDelay(); + OptionalInt maxRpcAttempts(); + Optional initialRpcTimeout(); + Optional totalRpcTimeout(); + Optional initialRetryDelay(); OptionalInt minChannelCount(); diff --git a/servers/quarkus-common/src/main/java/org/projectnessie/quarkus/providers/storage/BigTableBackendBuilder.java b/servers/quarkus-common/src/main/java/org/projectnessie/quarkus/providers/storage/BigTableBackendBuilder.java index 846af0eabb0..ea4d5477779 100644 --- a/servers/quarkus-common/src/main/java/org/projectnessie/quarkus/providers/storage/BigTableBackendBuilder.java +++ b/servers/quarkus-common/src/main/java/org/projectnessie/quarkus/providers/storage/BigTableBackendBuilder.java @@ -139,6 +139,8 @@ public Backend buildBackend() { configureDataClient( dataSettings, Optional.of(poolSettings), + bigTableConfig.totalRpcTimeout(), + bigTableConfig.maxRpcAttempts(), bigTableConfig.maxRetryDelay(), bigTableConfig.initialRpcTimeout(), bigTableConfig.initialRetryDelay()); diff --git a/versioned/storage/bigtable/src/main/java/org/projectnessie/versioned/storage/bigtable/AbstractBigTableBackendTestFactory.java b/versioned/storage/bigtable/src/main/java/org/projectnessie/versioned/storage/bigtable/AbstractBigTableBackendTestFactory.java index a08823fab69..9a5197c72f4 100644 --- a/versioned/storage/bigtable/src/main/java/org/projectnessie/versioned/storage/bigtable/AbstractBigTableBackendTestFactory.java +++ b/versioned/storage/bigtable/src/main/java/org/projectnessie/versioned/storage/bigtable/AbstractBigTableBackendTestFactory.java @@ -25,6 +25,7 @@ import com.google.common.annotations.VisibleForTesting; import java.io.IOException; import java.util.Optional; +import java.util.OptionalInt; import org.projectnessie.versioned.storage.common.persist.Backend; import org.projectnessie.versioned.storage.testextension.BackendTestFactory; @@ -61,7 +62,13 @@ BigtableDataClient buildNewDataClient() { .setCredentialsProvider(NoCredentialsProvider.create()); configureDataClient( - settings, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + settings, + Optional.empty(), + Optional.empty(), + OptionalInt.empty(), + Optional.empty(), + Optional.empty(), + Optional.empty()); return BigtableDataClient.create(settings.build()); } catch (IOException e) { diff --git a/versioned/storage/bigtable/src/main/java/org/projectnessie/versioned/storage/bigtable/BigTableBackendFactory.java b/versioned/storage/bigtable/src/main/java/org/projectnessie/versioned/storage/bigtable/BigTableBackendFactory.java index c8bd0280b8b..79b0b4947b9 100644 --- a/versioned/storage/bigtable/src/main/java/org/projectnessie/versioned/storage/bigtable/BigTableBackendFactory.java +++ b/versioned/storage/bigtable/src/main/java/org/projectnessie/versioned/storage/bigtable/BigTableBackendFactory.java @@ -23,6 +23,7 @@ import java.time.Duration; import java.util.List; import java.util.Optional; +import java.util.OptionalInt; import java.util.function.Consumer; import javax.annotation.Nonnull; import org.projectnessie.versioned.storage.common.persist.Backend; @@ -56,6 +57,8 @@ public Backend buildBackend(@Nonnull @jakarta.annotation.Nonnull BigTableBackend public static void configureDataClient( BigtableDataSettings.Builder settings, Optional channelPoolSettings, + Optional totalRpcTimeout, + OptionalInt maxAttempts, Optional maxRetryDelay, Optional initialRpcTimeout, Optional initialRetryDelay) { @@ -68,9 +71,11 @@ public static void configureDataClient( stubSettings.mutateRowSettings().retrySettings(), stubSettings.bulkMutateRowsSettings().retrySettings(), stubSettings.readChangeStreamSettings().retrySettings())) { + configureDuration(totalRpcTimeout, retrySettings::setTotalTimeout); configureDuration(initialRpcTimeout, retrySettings::setInitialRpcTimeout); configureDuration(initialRetryDelay, retrySettings::setInitialRetryDelay); configureDuration(maxRetryDelay, retrySettings::setMaxRetryDelay); + maxAttempts.ifPresent(retrySettings::setMaxAttempts); } channelPoolSettings.ifPresent(