You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2023/01/12 21:29:51 UTC

[GitHub] [iceberg] singhpk234 commented on a diff in pull request #6539: Core: Create commit groups in commit service offer in RewriteDataFilesCommitManager

singhpk234 commented on code in PR #6539:
URL: https://github.com/apache/iceberg/pull/6539#discussion_r1068675361


##########
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:
   +1, makes sense, making the changes 



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org