void removeUnreadableSSTables ( File directory ) { View currentView , newView ; Set < SSTableReader > remaining = new HashSet <> ( ) ; do { currentView = view . get ( ) ; for ( SSTableReader r : currentView . nonCompactingSStables ( ) ) if ( ! r . descriptor . directory . equals ( directory ) ) remaining . add ( r ) ; if ( remaining . size ( ) == currentView . nonCompactingSStables ( ) . size ( ) ) return ; newView = currentView . replace ( currentView . sstables , remaining ) ; } while ( ! view . compareAndSet ( currentView , newView ) ) ; for ( SSTableReader sstable : currentView . sstables ) if ( ! remaining . contains ( sstable ) ) sstable . selfRef ( ) . release ( ) ; notifySSTablesChanged ( remaining , Collections . < SSTableReader > emptySet ( ) , OperationType . UNKNOWN ) ; }
Removes every SSTable in the directory from the DataTracker s view .