Skip to content

Commit

Permalink
The ReadConsistencyOK operator is inconsistent with the comments. The…
Browse files Browse the repository at this point in the history
… comments do not explain the relationship between read and write consistencies, but the operator defines specific constraints based on the write consistency level.
  • Loading branch information
lemmy committed Dec 5, 2023
1 parent 0e25985 commit c926399
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions simple-model/CosmosDB.tla
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,12 @@ WriteCanSucceed(token) ==
/\ token.epoch = epoch
/\ token.checkpoint <= commitIndex)

\* This predicate indicates whether a read consistency if
\* This predicate indicates whether a read consistency is
\* valid, given a particular configured write consistency.
\*
\* A read consistency is valid if it is not stronger than
\* the configured write consistency. In other words, the
\* write consistency level defines the upper bound for the
\* strongest read consistency level that can be used.
ReadConsistencyOK(level) ==
CASE WriteConsistencyLevel = StrongConsistency ->
TRUE
Expand Down

0 comments on commit c926399

Please sign in to comment.