dlmarion commented on code in PR #5588: URL: https://github.com/apache/accumulo/pull/5588#discussion_r2114253258
########## core/src/main/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlanner.java: ########## @@ -307,6 +309,19 @@ public CompactionPlan makePlan(PlanningParameters params) { group = findDataFilesToCompact(filesCopy, params.getRatio(), maxFilesToCompact, maxSizeToCompact); + while (!group.isEmpty() && !Collections.disjoint(group, expectedFiles)) { + // remove these files as compaction candidates because they include a file that a running + // compaction would produce + filesCopy.removeAll(group); + // Create a fake file+size entry that predicts what this projected compaction would + // produce + var futureFile = getExpectedFile(group, nextExpected); + Preconditions.checkState(expectedFiles.add(futureFile)); Review Comment: A message might be useful here for the log ########## core/src/main/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlanner.java: ########## @@ -307,6 +309,19 @@ public CompactionPlan makePlan(PlanningParameters params) { group = findDataFilesToCompact(filesCopy, params.getRatio(), maxFilesToCompact, maxSizeToCompact); + while (!group.isEmpty() && !Collections.disjoint(group, expectedFiles)) { + // remove these files as compaction candidates because they include a file that a running + // compaction would produce + filesCopy.removeAll(group); + // Create a fake file+size entry that predicts what this projected compaction would + // produce + var futureFile = getExpectedFile(group, nextExpected); + Preconditions.checkState(expectedFiles.add(futureFile)); + // look for any compaction work in the remaining set of files + group = findDataFilesToCompact(filesCopy, params.getRatio(), maxFilesToCompact, + maxSizeToCompact); + } + Review Comment: You have a higher probability of `group` being empty at the end of this loop with these changes. Is that the intended effect? -- 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: notifications-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org