public long runCompactionCycle ( HollowCompactor . CompactionConfig config ) { if ( config != null && readStates . hasCurrent ( ) ) { final HollowCompactor compactor = new HollowCompactor ( getWriteEngine ( ) , readStates . current ( ) . getStateEngine ( ) , config ) ; if ( compactor . needsCompaction ( ) ) { return runCycle ( newState -> compactor . compact ( ) ) ; } } return NO_ANNOUNCEMENT_AVAILABLE ; }
Run a compaction cycle will produce a data state with exactly the same data as currently but reorganized so that ordinal holes are filled . This may need to be run multiple times to arrive at an optimal state .