cockroach
cockroach copied to clipboard
kv: pass explicit Now timestamp on BatchRequest, remove timestamp downcasting
First commit from #76233.
This commit adds an explicit ClockTimestamp field called Now to the BatchRequest header, which mirrors the Now field on the BatchResponse header.
In doing so, it removes the last instance where we downcasted a Timestamp to a ClockTimestamp using the TryToClockTimestamp method. With this change, MVCC ("operation") timestamps never flow back into HLC clocks as clock signals. This was enabled by #80706 and sets the groundwork to remove synthetic timestamps in v23.1 — the role they played in dynamic typing of clock timestamps is now entirely fulfilled by statically typed ClockTimestamp channels.
This is an important step in separating out the MVCC timestamp domain from the clock timestamp domain and clarifying the roles of the two layers. In turn, this layering opens the door for CockroachDB to start thinking about dynamic clock synchronization error bounds.
TFTR!
Was this implicitly an approval for https://github.com/cockroachdb/cockroach/pull/76233 as well, or does that still need another look?
TFTR!
bors r+
bors r-
This seems to be causing issues in bors. CI was all green until the last rebase, so something might be up.
Canceled.
I think it might have skewed with https://github.com/cockroachdb/cockroach/pull/83213. The benchmark (BenchmarkMVCCGCWithForegroundTraffic) added in that PR now seems to be failing.
bors r+