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{ |
and we skip over the values here:
|
// 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.
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:
cockroach/pkg/kv/kvserver/replica_rangefeed.go
Line 387 in c4de73f
cockroach/pkg/kv/kvserver/rangefeed/task.go
Line 84 in c4de73f
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.