hangc0276 commented on code in PR #3205:
URL: https://github.com/apache/bookkeeper/pull/3205#discussion_r850379773
##########
bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/CompactionTest.java:
##########
@@ -332,6 +332,95 @@ public void checkpointComplete(Checkpoint checkPoint,
boolean compact)
});
}
+ @Test
+ public void testForceGarbageCollectionWhenDiskIsFull() throws Exception {
+ testForceGarbageCollectionWhenDiskIsFull(true);
+ testForceGarbageCollectionWhenDiskIsFull(false);
+ }
+
+ public void testForceGarbageCollectionWhenDiskIsFull(boolean
isForceCompactionAllowWhenDisableCompaction)
+ throws Exception {
+
+ restartBookies(conf -> {
+ if (isForceCompactionAllowWhenDisableCompaction) {
+ conf.setMinorCompactionInterval(0);
+ conf.setMajorCompactionInterval(0);
+ conf.setForceAllowCompaction(true);
+ conf.setMajorCompactionThreshold(0.5f);
+ conf.setMinorCompactionThreshold(0.2f);
+ } else {
+ conf.setMinorCompactionInterval(120000);
Review Comment:
I just call the `triggerGC` to trigger compaction, so the interval won't
affect the time cost of the test run.
--
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]