public void abort ( ) { assert descriptor . type . isTemporary ; if ( iwriter == null && dataFile == null ) return ; if ( iwriter != null ) iwriter . abort ( ) ; if ( dataFile != null ) dataFile . abort ( ) ; Set < Component > components = SSTable . componentsFor ( descriptor ) ; try { if ( ! components . isEmpty ( ) ) SSTable . delete ( descriptor , components ) ; } catch ( FSWriteError e ) { logger . error ( String . format ( "Failed deleting temp components for %s" , descriptor ) , e ) ; throw e ; } }
After failure attempt to close the index writer and data file before deleting all temp components for the sstable