public boolean truncateInvalidTxBefore ( long time ) throws InvalidTruncateTimeException { // guard against changes to the transaction log while processing txMetricsCollector . rate ( "truncateInvalidTxBefore" ) ; Stopwatch timer = new Stopwatch ( ) . start ( ) ; this . logReadLock . lock ( ) ; try { boolean success ; synchronized ( this ) { ensureAvailable ( ) ; success = doTruncateInvalidTxBefore ( time ) ; } appendToLog ( TransactionEdit . createTruncateInvalidTxBefore ( time ) ) ; txMetricsCollector . histogram ( "truncateInvalidTxBefore.latency" , ( int ) timer . elapsedMillis ( ) ) ; return success ; } finally { this . logReadLock . unlock ( ) ; } }
Removes all transaction ids started before the given time from invalid list .