It is possible the last decided leader to be a Skip one. In that case we don't return that at all making the commit rule retry committing again for that round the next time which is not efficient. Instead we are now keep the last "decided" leader to correctly resume the commit rule. We still keep storing though the last "committed" for crash/recovery.
Simplify the filtering logic on the try_commit method and process up to highest_known_round.saturating_sub(2) since it would never be possible to draw any meaningful conclusions for them
report the metrics after the decided leaders that will be committed/skipped have been figured out. That avoids any issues of double counting when we can't commit due to early undecided leaders.
This PR is addressing the following:
Skip
one. In that case we don't return that at all making the commit rule retry committing again for that round the next time which is not efficient. Instead we are now keep the last "decided" leader to correctly resume the commit rule. We still keep storing though the last "committed" for crash/recovery.try_commit
method and process up tohighest_known_round.saturating_sub(2)
since it would never be possible to draw any meaningful conclusions for them