[
https://issues.apache.org/jira/browse/BEAM-9792?focusedWorklogId=464380&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-464380
]
ASF GitHub Bot logged work on BEAM-9792:
----------------------------------------
Author: ASF GitHub Bot
Created on: 30/Jul/20 07:34
Start Date: 30/Jul/20 07:34
Worklog Time Spent: 10m
Work Description: ihji commented on a change in pull request #12106:
URL: https://github.com/apache/beam/pull/12106#discussion_r462534513
##########
File path:
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryServicesImplTest.java
##########
@@ -733,26 +734,29 @@ public void testInsertOtherRetry() throws Throwable {
when(response.getContent())
.thenReturn(toStream(errorWithReasonAndStatus("actually forbidden",
403)))
.thenReturn(toStream(new TableDataInsertAllResponse()));
-
- DatasetServiceImpl dataService =
- new DatasetServiceImpl(bigquery, PipelineOptionsFactory.create());
- dataService.insertAll(
- ref,
- rows,
- null,
- BackOffAdapter.toGcpBackOff(TEST_BACKOFF.backoff()),
- TEST_BACKOFF,
- new MockSleeper(),
- InsertRetryPolicy.alwaysRetry(),
- null,
- null,
- false,
- false,
- false);
- verify(response, times(2)).getStatusCode();
- verify(response, times(2)).getContent();
- verify(response, times(2)).getContentType();
- expectedLogs.verifyInfo("BigQuery insertAll error, retrying:");
+ try {
+ DatasetServiceImpl dataService =
+ new DatasetServiceImpl(bigquery, PipelineOptionsFactory.create());
+ dataService.insertAll(
+ ref,
+ rows,
+ null,
+ BackOffAdapter.toGcpBackOff(TEST_BACKOFF.backoff()),
+ TEST_BACKOFF,
+ new MockSleeper(),
+ InsertRetryPolicy.alwaysRetry(),
+ null,
+ null,
+ false,
+ false,
+ false);
+ fail();
+ } catch (RuntimeException e) {
+ assertTrue(e instanceof RuntimeException);
Review comment:
I think it looks better to use `thrown.expect` and
`thrown.expectMessage` instead of `assertTrue` with `instanceof`.
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryServicesImpl.java
##########
@@ -806,6 +811,19 @@ public void deleteDataset(String projectId, String
datasetId)
try {
return insert.execute().getInsertErrors();
} catch (IOException e) {
+ GoogleJsonError.ErrorInfo errorInfo =
getErrorInfo(e);
+ if (errorInfo == null) {
+ throw e;
+ }
+ /**
+ * TODO:Check for quotaExceededError The check will
be replaced by
Review comment:
TODO(BEAM-10584): Check for QUOTA_EXCEEDED error will be replaced by
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 464380)
Time Spent: 3h 40m (was: 3.5h)
> BigQuery insertAll ignores retry policy for all errors throwing IOException
> ---------------------------------------------------------------------------
>
> Key: BEAM-9792
> URL: https://issues.apache.org/jira/browse/BEAM-9792
> Project: Beam
> Issue Type: Bug
> Components: io-java-gcp
> Reporter: Heejong Lee
> Assignee: Jiadai Xia
> Priority: P2
> Labels: starter
> Time Spent: 3h 40m
> Remaining Estimate: 0h
>
> BigQuery insertAll ignores retry policy for all errors throwing IOException
> (it retries forever with backoff)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)