void setLeaderState ( boolean isLeader ) { m_isLeader = isLeader ; // The leader doesn't truncate its own SP log; if promoted, // wipe out the SP portion of the existing log. This promotion // action always happens after repair is completed. if ( m_isLeader ) { if ( ! m_logSP . isEmpty ( ) ) { truncate ( m_logSP . getLast ( ) . getHandle ( ) , IS_SP ) ; } } }
leaders log differently