private void truncate ( long handle , boolean isSP ) { // MIN value means no work to do, is a startup condition if ( handle == Long . MIN_VALUE ) { return ; } Deque < RepairLog . Item > deq = null ; if ( isSP ) { deq = m_logSP ; if ( m_truncationHandle < handle ) { m_truncationHandle = handle ; notifyTxnCommitInterests ( handle ) ; } } else { deq = m_logMP ; } RepairLog . Item item = null ; while ( ( item = deq . peek ( ) ) != null ) { if ( item . canTruncate ( handle ) ) { deq . poll ( ) ; } else { break ; } } }
trim unnecessary log messages .