get()/put() serialization #3962
-
Based on the understanding from discussion #3926, I am looking to confirm the following as I got into more doubts. Let's say I have the following: Case 1So, seems like following code will break the serialization if getting executed in parallel as the root of the transaction is same for both and one of them will get rejected. EDIT1: Seems like it won't break serialization as the Keys are different Thread1 (Key1)
Thread2 (Key2)
Case 2Same result as above, as there's no surety that consensus has committed the transaction EDIT1: Not same as above, but will result in a bad state of KV
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@divneil-intel Yes, as @achamayou said in #3926:
If you use When a transaction begins, it is assigned 2 distinct versions to read from: the first is the most recent state, that all
The intent is that you could run a sequence of operations like |
Beta Was this translation helpful? Give feedback.
@divneil-intel Yes, as @achamayou said in #3926:
If you use
get()
andput()
in the same transaction, then CCF will detect any conflicts with concurrently executing transactions (ie - those that have completed in the gap between this transaction selecting a read version and it completing), and automatically rerun the transaction (reading newer state).get_globally_committed()
can be used to deliberately circumvent this flow to report only committed state, but reads of that committed state will not be treated as conflicts, so if they influence w…