yirutang commented on code in PR #24145:
URL: https://github.com/apache/beam/pull/24145#discussion_r1067553532
##########
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:
Some responses are coming back and the updatedTableSchema is being updated
L568, which in race with the postFlush here.
--
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]