question: void updateWaitingCommands ( ) { int index = commitIndex ; if ( isLeader ( ) ) { CoreCmd ccmd = waitQueue . peek ( ) ; while ( ccmd != null && ccmd . index <= index ) { latency . tail ( ccmd . index ) ; ccmd . update ( Command . STATUS_OK , leaderId ) ; waitQueue . poll ( ) ; ccmd = waitQueue . peek ( ) ; } } saveQueue . getLatest ( savedRid ) ; index = Math . min ( commitIndex , savedRid . index ) ; commitQueue . updateCommitIndex ( index ) ; }
target:  Called as a result of incoming append entry reply messages. Attempts to release as many waiting commands as possible.