-
Notifications
You must be signed in to change notification settings - Fork 4.1k
kvserver/rangefeed: only scan separated intents span to bootstrap resolved timestamp #69697
Copy link
Copy link
Closed
Labels
A-cdcChange Data CaptureChange Data CaptureA-kv-serverRelating to the KV-level RPC serverRelating to the KV-level RPC serverC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-cdcT-disaster-recovery
Description
Is your feature request related to a problem? Please describe.
Today we initialize the resolved timestamp by iterating all of the intents in the range. We do this by iterating the entire range and only looking at the intents. We set up the iterator here:
| return r.Engine().NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{ |
| // If the key is not a metadata key, ignore it. |
If we were to restrict this scan to only the separated intents on ranges which have been fully migrated to only use separated intents, we could avoid a full data scan during rangefeed startup. This is a big win!
Describe the solution you'd like
We should set up the RTS iterator to only look at the separated intents when appropriate.
Additional context
There's been talk in the past of storing the resolved timestamp start. I don't think we need to do this with the separated intents.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-cdcChange Data CaptureChange Data CaptureA-kv-serverRelating to the KV-level RPC serverRelating to the KV-level RPC serverC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-cdcT-disaster-recovery