Skip to content

Commit

Permalink
matches
Browse files Browse the repository at this point in the history
  • Loading branch information
achamayou committed Jan 8, 2024
1 parent d97c824 commit 98cd354
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tla/consensus/Traceccfraft.tla
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ IsAppendEntriesRequest(msg, dst, src, logline) ==
/\ msg.term = logline.msg.packet.term
/\ msg.commitIndex = logline.msg.packet.leader_commit_idx
/\ msg.prevLogTerm = logline.msg.packet.prev_term
\* /\ Len(msg.entries) = logline.msg.packet.idx - logline.msg.packet.prev_idx
\* /\ msg.prevLogIndex + Len(msg.entries) = logline.msg.packet.idx
/\ Len(msg.entries) = logline.msg.packet.idx - logline.msg.packet.prev_idx
/\ msg.prevLogIndex + Len(msg.entries) = logline.msg.packet.idx
/\ msg.prevLogIndex = logline.msg.packet.prev_idx

IsAppendEntriesResponse(msg, dst, src, logline) ==
Expand Down Expand Up @@ -176,7 +176,7 @@ IsSendAppendEntries ==
/\ IsAppendEntriesRequest(msg, j, i, logline)
\* There is now one more message of this type.
/\ Network!OneMoreMessage(msg)
/\ logline.msg.sent_idx = nextIndex[i][j]
\* /\ logline.msg.sent_idx + 1 = nextIndex[i][j]
/\ logline.msg.match_idx = matchIndex[i][j]
/\ committableIndices[logline.msg.state.node_id] = Range(logline.msg.state.committable_indices)

Expand Down
2 changes: 1 addition & 1 deletion tla/consensus/ccfraft.tla
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ HandleAppendEntriesResponse(i, j, m) ==
UpdateTerm(i, j, m) ==
/\ m.term > currentTerm[i]
/\ currentTerm' = [currentTerm EXCEPT ![i] = m.term]
/\ state' = [state EXCEPT ![i] = IF @ \in {Leader, Candidate} THEN Follower ELSE @]
/\ state' = [state EXCEPT ![i] = IF @ \in {Leader, Candidate, None} THEN Follower ELSE @]
/\ votedFor' = [votedFor EXCEPT ![i] = Nil]
\* See rollback(last_committable_index()) in raft::become_follower
/\ log' = [log EXCEPT ![i] = SubSeq(@, 1, LastCommittableIndex(i))]
Expand Down

0 comments on commit 98cd354

Please sign in to comment.