shangxinli commented on code in PR #20429:
URL: https://github.com/apache/hudi/pull/20429#discussion_r4444188662
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/StreamSync.java:
##########
@@ -1247,13 +1247,18 @@ private void reInitWriteClient(HoodieSchema
sourceSchema, HoodieSchema targetSch
}
}
- if (writeClient != null) {
- // Close Write client.
- writeClient.close();
- }
KeyGenUtils.recordComplexKeygenEncodingIfMissing(metaClient, writeConfig);
+ SparkRDDWriteClient previousWriteClient = writeClient;
writeClient = new SparkRDDWriteClient<>(hoodieSparkContext, writeConfig,
embeddedTimelineService);
- onInitializingHoodieWriteClient.apply(writeClient);
+ // Switch the async table services before closing the previous client.
Each handoff waits for any active run
Review Comment:
The comment above claims each handoff waits for any active run to finish,
but AsyncCompactService.updateWriteClient and the clustering equivalent just
swap a plain field on the compactor with no wait, so a compaction already
running against the previous client when it gets closed here could still be
mid-call. Worth double checking whether there's drain logic elsewhere, since as
written the comment seems to overstate what the code actually guarantees.
--
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]