Abacn commented on code in PR #31253:
URL: https://github.com/apache/beam/pull/31253#discussion_r1599062584


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java:
##########
@@ -745,15 +745,22 @@ long flush(
                 quotaError = statusCode.equals(Status.Code.RESOURCE_EXHAUSTED);
               }
 
+              int allowedRetry;
+
               if (!quotaError) {
                 // This forces us to close and reopen all gRPC connections to 
Storage API on error,
                 // which empirically fixes random stuckness issues.
                 invalidateWriteStream();
+                allowedRetry = 5;
+              } else {
+                allowedRetry = 10;

Review Comment:
   originally, it will retry 5 times (make API call 6 times) within 
(1.5^6-1)/(1.5-1) ~ 20s. Now, 10 retries happened in (1.5^8-1)/(1.5-1) + 20/2 ~ 
90s



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to