Skip to content

kv: re-enable time-bound iterators for KV requests #53348

@nvb

Description

@nvb

EndTxnRequest, RefreshRangeRequest, and ResolveIntentRangeRequest are all good use cases for time-bound iterators. In fact, at one point, all three requests applied min and max timestamp hints to their iterators. However, due to concerns about correctness, TBIs were disabled for these request types in 1eb3b2a.

Since then, time-bounder iterators have been re-enabled in important bulk operations like ExportToSST (#43799) by pairing them with a normal iterator to resolve ambiguity related to MVCC metadata keys. This pairing is packaged up in the MVCCIncrementalIterator abstraction.

We should explore the use of MVCCIncrementalIterator for some of these request types again. When doing so, we'll need to keep in mind that MVCCIncrementalIterator may pessimize performance of scans that have a high intent/value ratio, so this may be more appropriate for some request types (e.g. RefreshRangeRequest) than others (e.g. EndTxnRequest).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-kv-transactionsRelating to MVCC and the transactional model.C-performancePerf of queries or internals. Solution not expected to change functional behavior.T-kvKV Team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions