reuvenlax commented on code in PR #24145:
URL: https://github.com/apache/beam/pull/24145#discussion_r1067562385


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java:
##########
@@ -512,6 +581,18 @@ String retrieveErrorDetails(Iterable<AppendRowsContext> 
failedContext) {
             .map(StackTraceElement::toString)
             .collect(Collectors.joining("\n"));
       }
+
+      void postFlush() {
+        // If we got a response indicating an updated schema, recreate the 
client.
+        if (updatedTableSchema != null
+            && this.appendClientInfo != null
+            && this.appendClientInfo.hasSchemaChanged(updatedTableSchema)) {
+          invalidateWriteStream();
+          appendClientInfo =
+              Preconditions.checkStateNotNull(getAppendClientInfo(false, 
updatedTableSchema));
+          updatedTableSchema = null;

Review Comment:
   postFlush is called only after all futures have completed (in flushAll), so 
we would not expect any more callbacks. Also note that RetryManager calls these 
response callbacks in the primary thread (RetryManager.await() calls the 
callbacks), so the callbacks here are not being called asynchronously.



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