RussellSpitzer commented on code in PR #6539: URL: https://github.com/apache/iceberg/pull/6539#discussion_r1068569488
########## core/src/main/java/org/apache/iceberg/actions/RewriteDataFilesCommitManager.java: ########## @@ -264,5 +253,35 @@ public void close() { "File groups offered after service was closed, " + "they were not successfully committed."); } + + private void commitReadyCommitGroups() { + if (canCreateCommitGroup()) { + synchronized (completedRewrites) { + if (canCreateCommitGroup()) { + String inProgressCommitToken = UUID.randomUUID().toString(); + Set<RewriteFileGroup> batch = Sets.newHashSetWithExpectedSize(rewritesPerCommit); + for (int i = 0; i < rewritesPerCommit && !completedRewrites.isEmpty(); i++) { + batch.add(completedRewrites.poll()); + } Review Comment: Synchronize (completeRewrites) { create batch } try commit batch -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org