public void resetState ( ) { this . logWriteLock . lock ( ) ; try { // Take a snapshot before resetting the state, for debugging purposes doSnapshot ( false ) ; // Clear the state clear ( ) ; // Take another snapshot: if no snapshot is taken after clearing the state // and the manager is restarted, we will recover from the snapshot taken // before resetting the state, which would be really bad // This call will also init a new WAL doSnapshot ( false ) ; } catch ( IOException e ) { LOG . error ( "Snapshot failed when resetting state!" , e ) ; e . printStackTrace ( ) ; } finally { this . logWriteLock . unlock ( ) ; } }
Resets the state of the transaction manager .