ConeyLiu commented on code in PR #8001:
URL: https://github.com/apache/iceberg/pull/8001#discussion_r1276095665
##########
core/src/main/java/org/apache/iceberg/actions/RewriteDataFilesCommitManager.java:
##########
@@ -75,7 +75,12 @@ public void commitFileGroups(Set<RewriteFileGroup>
fileGroups) {
rewrite.rewriteFiles(rewrittenDataFiles, addedDataFiles);
}
- rewrite.commit();
+ synchronized (this) {
+ // synchronized to avoid committing conflict by multiple threads when
enabled
+ // partial-progress. And it should be cheaper when not enabled
partial-progress
+ // because it commits in a single thread
+ rewrite.commit();
Review Comment:
Add the lock here to narrow the scope.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]