reuvenlax commented on code in PR #24145:
URL: https://github.com/apache/beam/pull/24145#discussion_r1067496724
##########
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:
what race do you envision?
--
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]