You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "ConeyLiu (via GitHub)" <gi...@apache.org> on 2024/02/02 06:30:47 UTC

Re: [PR] Core: Supports limiting the count of manifests to merge when committing [iceberg]

ConeyLiu commented on code in PR #9609:
URL: https://github.com/apache/iceberg/pull/9609#discussion_r1475596616


##########
core/src/main/java/org/apache/iceberg/ManifestMergeManager.java:
##########
@@ -148,11 +167,13 @@ private Iterable<ManifestFile> mergeGroup(
               // if the number of manifests is above the minimum count. this is applied only to bins
               // with an in-memory
               // manifest so that large manifests don't prevent merging older groups.
-              if (bin.contains(first) && bin.size() < minCountToMerge) {
+              if ((bin.contains(first) && bin.size() < minCountToMerge)
+                  || bin.size() > mergeLimit.get()) {
                 // not enough to merge, add all manifest files to the output list
                 outputManifests.addAll(bin);
               } else {
                 // merge the group
+                mergeLimit.addAndGet(-1 * bin.size());

Review Comment:
   The order is not guaranteed since it is processed concurrently. 



-- 
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