public void unreferenceSSTables ( ) { Set < SSTableReader > notCompacting ; View currentView , newView ; do { currentView = view . get ( ) ; notCompacting = currentView . nonCompactingSStables ( ) ; newView = currentView . replace ( notCompacting , Collections . < SSTableReader > emptySet ( ) ) ; } while ( ! view . compareAndSet ( currentView , newView ) ) ; if ( notCompacting . isEmpty ( ) ) { // notifySSTablesChanged -> LeveledManifest.promote doesn't like a no-op "promotion" return ; } notifySSTablesChanged ( notCompacting , Collections . < SSTableReader > emptySet ( ) , OperationType . UNKNOWN ) ; removeOldSSTablesSize ( notCompacting ) ; releaseReferences ( notCompacting , true ) ; }
removes all sstables that are not busy compacting .