Skip to content

Commit

Permalink
Fix LogConfigurationConsistentInv to account for joining nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
achamayou committed Jan 8, 2024
1 parent 98cd354 commit 35f44e5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tla/consensus/ccfraft.tla
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ AppendEntries(i, j) ==
\* No messages to itself and sender is primary
/\ state[i] = Leader
/\ i /= j
/\ j \in GetServerSet(i)
\* AppendEntries must be sent for historical entries, unless
\* snapshots are used. Whether the node is in configuration at
\* that index makes no difference.
Expand Down Expand Up @@ -1222,13 +1223,18 @@ MonoLogInv ==
LogConfigurationConsistentInv ==
\A i \in Servers :
\/ state[i] = None
\* Follower, but no known configurations yet
\/ /\ state[i] = Follower
/\ Cardinality(DOMAIN configurations[i]) = 0
\/
\* Configurations should have associated reconfiguration txs in the log
/\ \A idx \in DOMAIN (configurations[i]) :
/\ log[i][idx].contentType = TypeReconfiguration
/\ log[i][idx].configuration = configurations[i][idx]
\* Current configuration should be committed
/\ commitIndex[i] >= CurrentConfigurationIndex(i)
\* Current configuration should be committed if there is one
\* but a configuration may not be committable yet.
\* /\ Cardinality(DOMAIN configurations[i]) > 0
\* => commitIndex[i] >= CurrentConfigurationIndex(i)
\* Pending configurations should not be committed yet
/\ Cardinality(DOMAIN configurations[i]) > 1
=> commitIndex[i] < NextConfigurationIndex(i)
Expand Down

0 comments on commit 35f44e5

Please sign in to comment.