Resolve one TODO

This commit is contained in:
Smaug123
2022-11-12 20:57:39 +00:00
parent 7870f1160d
commit 99d6e507d8

View File

@@ -454,8 +454,8 @@ type Server<'a>
| None ->
// The leader knows what we've committed, so it won't try and give us anything further than
// the element immediately past our persisted log.
// TODO - why can't this be -1?
assert (desiredLogInsertionPosition = 1<LogIndex> + persistentState.CurrentLogIndex)
if desiredLogInsertionPosition <> 1<LogIndex> + persistentState.CurrentLogIndex then
failwith "Logic error: the leader has tried to update an entry from our future."
// The leader's message is after our log. Append.
persistentState.AppendToLog toInsert toInsertTerm