mirror of
https://github.com/pingcap/tla-plus.git
synced 2024-12-26 12:30:10 +08:00
all writes cannot overlap (#7)
This commit is contained in:
parent
393b685359
commit
013fe46836
@ -279,16 +279,13 @@ TypeInvariant ==
|
||||
/\ KeyWriteTypeInv
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
checkWriteOrder(w1, w2) ==
|
||||
/\ w1.commit_ts < w2.commit_ts
|
||||
/\ w1.start_ts < w2.start_ts
|
||||
|
||||
\* The committed write timestamp of the key must be in order, and for each
|
||||
\* write, the commit_ts should be strictly greater than start_ts.
|
||||
\* The committed write timestamp of one key must be in order, and no two writes
|
||||
\* can overlap. For each write, the commit_ts should be strictly greater than
|
||||
\* start_ts.
|
||||
WriteConsistency ==
|
||||
/\ \A k \in KEY :
|
||||
\A n \in 1..Len(key_write[k]) - 1 :
|
||||
checkWriteOrder(key_write[k][n], key_write[k][n + 1])
|
||||
key_write[k][n].commit_ts < key_write[k][n + 1].start_ts
|
||||
/\ \A k \in KEY :
|
||||
\A n \in 1..Len(key_write[k]) :
|
||||
key_write[k][n].start_ts < key_write[k][n].commit_ts
|
||||
|
Loading…
Reference in New Issue
Block a user