Abacn commented on code in PR #38410:
URL: https://github.com/apache/beam/pull/38410#discussion_r3242897651
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWritesShardedRecords.java:
##########
@@ -722,11 +713,24 @@ private void handleAppendFailure(
// Finalize the stream and clear streamName so a new stream will be
created.
o.get(flushTag)
.output(KV.of(failedContext.streamName, new
Operation(failedContext.offset - 1, true)));
+
+ // Clear streamName so a new stream will be created.
+ try {
+ streamName.write("");
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+
+ // Re-establish the client with the new stream.
+ resetClient.run();
+
// Reinitialize all contexts with the new stream and new offsets.
- initializeContexts.accept(failedContexts, true);
+ initializeContexts.accept(failedContexts);
Review Comment:
This review commend looks plausible as well...
--
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]