You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/07/17 22:40:48 UTC

[GitHub] [beam] chamikaramj commented on a change in pull request #12295: [BEAM-10520] Propagate BigQueryIO streaming insert quota errors to Da…

chamikaramj commented on a change in pull request #12295:
URL: https://github.com/apache/beam/pull/12295#discussion_r456702667



##########
File path: sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryServicesImpl.java
##########
@@ -401,11 +401,9 @@ public Job getJob(JobReference jobRef, Sleeper sleeper, BackOff backoff)
     private static final FluentBackoff INSERT_BACKOFF_FACTORY =
         FluentBackoff.DEFAULT.withInitialBackoff(Duration.millis(200)).withMaxRetries(5);
 
-    // A backoff for rate limit exceeded errors. Retries forever.
+    // A backoff for rate limit exceeded errors. Only retry upto approximately 2 minutes.

Review comment:
       Probably add a comment as to why we are limiting this.

##########
File path: sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryServicesImpl.java
##########
@@ -811,7 +809,11 @@ public void deleteDataset(String projectId, String datasetId)
                                   "BigQuery insertAll error, retrying: %s",
                                   ApiErrorExtractor.INSTANCE.getErrorMessage(e)));
                           try {
-                            sleeper.sleep(backoff1.nextBackOffMillis());
+                            long nextBackOffMillis = backoff1.nextBackOffMillis();
+                            if (nextBackOffMillis == BackOff.STOP) {
+                              throw e;

Review comment:
       Can we add a unit test for this behavior ?




----------------------------------------------------------------
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.

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