Bug about Major compaction and Minor Compaction in copy cat
txm119161336 opened this issue · comments
Hi Jordan,
currently ,the major compaction and minor compaction are running respectively, which means ,by coincidently, maybe they will run at the same time, there is a step by which we can change the
the segments list ,like segmentlist.put(); if the minor compaction do this step after the major compaction,
maybe the major compacted segment will be discarded.
Have you seen them run at the same time?
The current logic uses the previous compaction's CompletableFuture
to start the next compaction afterwards:
https://github.com/atomix/copycat/blob/master/server/src/main/java/io/atomix/copycat/server/storage/compaction/Compactor.java#L191-L194