Get desktop application:
View/edit binary Protocol Buffers messages
Used in:
The lock is rolled back because it has expired.
The lock does not exist, TinyKV left a record of the rollback, but did not have to delete a lock.
Rollback an un-committed transaction. Will fail if the transaction has already been committed or keys are locked by a different transaction. If the keys were never locked, no action is needed but it is not an error. If successful all keys will be unlocked and all uncommitted values removed.
Used as request type in: tinykvpb.TinyKv.KvBatchRollback
Empty if the rollback is successful.
Used as response type in: tinykvpb.TinyKv.KvBatchRollback
CheckTxnStatus reports on the status of a transaction and may take action to rollback expired locks. If the transaction has previously been rolled back or committed, return that information. If the TTL of the transaction is exhausted, abort that transaction and roll back the primary lock. Otherwise, returns the TTL information.
Used as request type in: tinykvpb.TinyKv.KvCheckTxnStatus
primary key and lock ts together to locate the primary lock of a transaction.
current_ts is used to check TTL timeout, it may be inaccurate.
Used as response type in: tinykvpb.TinyKv.KvCheckTxnStatus
Three kinds of txn status: locked: lock_ttl > 0 committed: commit_version > 0 rolled back: lock_ttl == 0 && commit_version == 0
The action performed by TinyKV in response to the CheckTxnStatus request.
Commit is the second phase of 2pc. The client must have successfully prewritten the transaction to all nodes. If all keys are locked by the given transaction, then the commit should succeed. If any keys are locked by a different transaction or are not locked at all (rolled back or expired), the commit fails.
Used as request type in: tinykvpb.TinyKv.KvCommit
Identifies the transaction, must match the start_version in the transaction's prewrite request.
Must match the keys mutated by the transaction's prewrite request.
Must be greater than start_version.
Empty if the commit is successful.
Used as response type in: tinykvpb.TinyKv.KvCommit
Miscellaneous data present in each request.
Used in:
, , , , , , , , , , ,Read the value of a key at the given time.
Used as request type in: tinykvpb.TinyKv.KvGet
Used as response type in: tinykvpb.TinyKv.KvGet
True if the requested key doesn't exist; another error will not be signalled.
Many responses can include a KeyError for some problem with one of the requested key. Only one field is set and it indicates what the client should do in response.
Used in:
, , , , ,Client should backoff or cleanup the lock then retry.
Client may restart the txn. e.g write conflict.
Client should abort the txn.
Another transaction is trying to write a key. The client can retry.
Either a key/value pair or an error for a particular key.
Used in:
,Used in:
,Used in:
Used in:
Used by TinySQL but not TinyKV.
Prewrite is the first phase of two phase commit. A prewrite commit contains all the writes (mutations) which a client would like to make as part of a transaction. The request succeeds if none of the keys are locked. In that case all those keys will be locked. If the prewrite fails, no changes are made to the DB.
Used as request type in: tinykvpb.TinyKv.KvPrewrite
Key of the primary lock.
Empty if the prewrite is successful.
Used as response type in: tinykvpb.TinyKv.KvPrewrite
Used as request type in: tinykvpb.TinyKv.RawDelete
Used as response type in: tinykvpb.TinyKv.RawDelete
Raw commands.
Used as request type in: tinykvpb.TinyKv.RawGet
Used as response type in: tinykvpb.TinyKv.RawGet
True if the requested key doesn't exist; another error will not be signalled.
Used as request type in: tinykvpb.TinyKv.RawPut
Used as response type in: tinykvpb.TinyKv.RawPut
Used as request type in: tinykvpb.TinyKv.RawScan
The maximum number of values read.
Used as response type in: tinykvpb.TinyKv.RawScan
An error which affects the whole scan. Per-key errors are included in kvs.
Resolve lock will find all locks belonging to the transaction with the given start timestamp. If commit_version is 0, TinyKV will rollback all locks. If commit_version is greater than 0 it will commit those locks with the given commit timestamp. The client will make a resolve lock request for all secondary keys once it has successfully committed or rolled back the primary key.
Used as request type in: tinykvpb.TinyKv.KvResolveLock
Empty if the lock is resolved successfully.
Used as response type in: tinykvpb.TinyKv.KvResolveLock
Read multiple values from the DB.
Used as request type in: tinykvpb.TinyKv.KvScan
The maximum number of values read.
Used as response type in: tinykvpb.TinyKv.KvScan
Other errors are recorded for each key in pairs.
Used in: