You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "igorbernstein2 (via GitHub)" <gi...@apache.org> on 2023/04/10 18:17:49 UTC

[GitHub] [beam] igorbernstein2 commented on a diff in pull request #26205: fix: Fix BigtableIO to share one BigtableService per worker and increase default attempt timeout

igorbernstein2 commented on code in PR #26205:
URL: https://github.com/apache/beam/pull/26205#discussion_r1161958924


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableConfigTranslator.java:
##########
@@ -180,10 +180,18 @@ private static BigtableDataSettings configureWriteSettings(
         settings.stubSettings().bulkMutateRowsSettings();
     RetrySettings.Builder retrySettings = callSettings.getRetrySettings().toBuilder();
     BatchingSettings.Builder batchingSettings = callSettings.getBatchingSettings().toBuilder();
+
+    // The default attempt timeout for version <= 2.46.0 is 6 minutes. Reset the timeout to align
+    // with the old behavior.
+    retrySettings
+        .setInitialRpcTimeout(Duration.ofMinutes(6))
+        .setMaxRpcTimeout(Duration.ofMinutes(6));
+
     if (writeOptions.getAttemptTimeout() != null) {

Review Comment:
   Might be nice to clean this up a bit:
   
   ```
   Duration attemptTimeout = Duration.ofMinutes(6);
   
   if (writeOptions.getAttemptTimeout() != null) {
     attemptTimeout = Duration.ofMillis(writeOptions.getAttemptTimeout().getMillis());
   }
   retrySettings.setInitialRpcTimeout(attemptTimeout).setMaxRpcTime(attemptTimeout);
   
   ```



-- 
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: github-unsubscribe@beam.apache.org

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