Skip to content

Commit

Permalink
Additional consistency invariant (microsoft#6184)
Browse files Browse the repository at this point in the history
  • Loading branch information
heidihoward authored May 16, 2024
1 parent 4eedf46 commit 5765fbd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tla/consistency/ExternalHistoryInvars.tla
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ OnceCommittedPrevCommittedInv ==
/\ history[j].tx_id[2] <= history[i].tx_id[2]
=> history[j].status = CommittedStatus

\* If a transaction is committed then all others from greater (or equal) seqnums but strictly smaller terms are invalid
OnceCommittedNextInvalidInv ==
\A i, j \in TxStatusReceivedEventIndexes:
/\ history[i].status = CommittedStatus
/\ history[i].tx_id[2] <= history[j].tx_id[2]
/\ history[j].tx_id[1] < history[i].tx_id[1]
=> history[j].status = InvalidStatus

\* If a transaction is invalid then so are all others from the same term with greater seqnums
OnceInvalidNextInvalidInv ==
\A i, j \in TxStatusReceivedEventIndexes:
Expand All @@ -98,6 +106,7 @@ OnceInvalidNextInvalidInv ==
\* The following is strengthened variant of CommittedOrInvalidInv
CommittedOrInvalidStrongInv ==
/\ OnceCommittedPrevCommittedInv
/\ OnceCommittedNextInvalidInv
/\ OnceInvalidNextInvalidInv


Expand Down

0 comments on commit 5765fbd

Please sign in to comment.