private void scheduleCompaction ( long lastApplied ) { // Schedule compaction after a randomized delay to discourage snapshots on multiple nodes at the same time. logger . trace ( "Scheduling compaction in {}" , COMPACT_DELAY ) ; stateContext . schedule ( COMPACT_DELAY , ( ) -> compactLogs ( lastApplied ) ) ; }
Schedules a log compaction .