Skip to content

KVSLockAcquired

Purpose

This message informs the Worker Engine that the sending Shard has recorded upcoming read or write requests to a key specified in an earlier KVSAcquireLock from the Worker Engine. It is an asynchronous response.

Structure

Field Type Description
fingerprint TxFingerprint the fingerprint of the TransactionCandidate for which some locks have been recorded
key KVSKey the key in the key value store that will be accessed
write bool true for write, false for read
optional bool true for may_write or may_read, false for will_write or will_read

Effects

Triggers

Note

Otherwise, a Shard might hear about a KVSAcquireLock only after it has heard UpdateSeenAll with a later TxFingerprint, causing it to execute the "later" transaction before it learned of the "earlier" one, which could allow the "later" transaction to read the wrong value from state. Therefore, it is important to let Worker Engines know which KVSAcquireLocks the shard has received.

(Wiki) links on this page

  1. In this way, a lock may be granted without knowing about declared access that would have to be served before.