keith-turner commented on code in PR #5620:
URL: https://github.com/apache/accumulo/pull/5620#discussion_r2130122402


##########
core/src/test/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlannerTest.java:
##########
@@ -564,21 +565,26 @@ public void testMaxTabletFiles() {
       assertEquals(createCFs(1000, 1.9), job.getFiles());
     }
 
-    // In this case the tablet can be brought below the max limit in single 
compaction, so it should
-    // find this
+    // The max compaction ratio is the first two files, so should compact 
these. Will require
+    // multiple compactions to bring the tablet below the limit.
     all =
         createCFs(1000, 1.9, 1.8, 1.7, 1.6, 1.5, 1.4, 1.5, 1.2, 1.1, 1.1, 1.1, 
1.1, 1.1, 1.1, 1.1);
     params = createPlanningParams(all, all, Set.of(), 3, 
CompactionKind.SYSTEM, conf);
     plan = planner.makePlan(params);
     job = getOnlyElement(plan.getJobs());
-    assertEquals(createCFs(1000, 1.9, 1.8, 1.7, 1.6, 1.5, 1.4, 1.5, 1.2, 1.1), 
job.getFiles());
+    assertEquals(createCFs(1000, 1.9), job.getFiles());
+
+    all = createCFs(10, 1.3, 2.2, 2.51, 1.02, 1.7, 2.54, 2.3, 1.7, 1.5, 1.4);

Review Comment:
   This is the new test that causes the old code to fail. One part of the code 
would keep finding 4 files with a ratio of 2.51 and another part of the code 
would reject it because it wanted 5 files.  Eventually the the search would 
terminate finding nothing.



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

Reply via email to