-
Notifications
You must be signed in to change notification settings - Fork 4.1k
kv: re-enable time-bound iterators for KV requests #53348
Description
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).