Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: rationalize proposal timestamp
This patch reworks the ReplicatedEvalResult.WriteTimestamp field (*). Before this patch, WriteTimestamp was always coming from ba.WriteTimestamp(), which is either a transaction's write timestamp or, for non-txn requests, the batch's read timestamp or, for non-MVCC requests, some random clock value. Below Raft, the field is used for updating the followers' clocks, and also to check the request against the GC threshold. This patch sets the WriteTimestamp differently for IntentWrite requests than other requests: - for regular writes, the field remains ba.WriteTimestamp() - for other proposals, the field is a clock reading on the proposer Some requests (e.g. LeaseTransfers) need a clock signal to travel with their proposal, and now they get it (see cockroachdb#62569). [*] An alternative to split the field into two was considered, but it's hard to do now because of backwards compatibility. It can be done in the next release, though, because now all the uses of the WriteTimestamp field tolerate it being empty. Fixes cockroachdb#62569 Release note: None
- Loading branch information