kvserver: MVCC-compliant RevertRange
variant
#70416
Labels
A-kv-server
Relating to the KV-level RPC server
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
As described in #69380, we need an MVCC-compliant variant of
RevertRange
that allows us to undo recent changes to a key span, typically in order to cancel bulk operations such asIMPORT INTO
. Conceptually, this needs to iterate across the visible keys at the target revert time (including tombstones), and any keys that have a different most-recent value must be replaced by its original value. In the case of deletes, if there are long runs of keys to delete, it should drop an MVCC range tombstone instead.To accomplish this, we should add a lower timestamp predicate toDeleteRange
that will only drop tombstones over keys that have a timestamp at or later than the given lower timestamp. It should use range tombstones where possible, to delete long runs of matching keys, but fall back to point tombstones when necessary.See also the (currently internal) design document.
Epic CRDB-2624
Jira issue: CRDB-10066
The text was updated successfully, but these errors were encountered: