-
Notifications
You must be signed in to change notification settings - Fork 4.1k
storage: optimize pointSynthesizingIter initialization #84380
Copy link
Copy link
Closed
Labels
A-kv-replicationRelating to Raft, consensus, and coordination.Relating to Raft, consensus, and coordination.A-storageRelating to our storage engine (Pebble) on-disk storage.Relating to our storage engine (Pebble) on-disk storage.C-performancePerf of queries or internals. Solution not expected to change functional behavior.Perf of queries or internals. Solution not expected to change functional behavior.T-storageStorage TeamStorage Team
Description
Optimize initialization and use of pointSynthesizingIter in pebbleMVCCScanner. For example, consider pooling it together with the scanner, and add a function to avoid seeking the underlying iterator when switching to point synthesis. I.e. this:
cockroach/pkg/storage/pebble_mvcc_scanner.go
Lines 1160 to 1170 in 7452088
| // TODO(erikgrinaker): We have to seek to the current iterator position to | |
| // correctly initialize pointSynthesizingIter, but we could just load the | |
| // underlying iterator state instead. We'll optimize this later. | |
| // | |
| // NB: The seek must use a cloned key, because it repositions the underlying | |
| // iterator and then uses the given seek key for comparisons, which is not | |
| // safe with UnsafeKey(). | |
| p.pointIter = newPointSynthesizingIter(p.parent, p.isGet) | |
| p.pointIter.SeekGE(p.parent.Key()) | |
| p.parent = p.pointIter | |
| return p.iterValid() |
Jira issue: CRDB-17625
Epic CRDB-2624
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-kv-replicationRelating to Raft, consensus, and coordination.Relating to Raft, consensus, and coordination.A-storageRelating to our storage engine (Pebble) on-disk storage.Relating to our storage engine (Pebble) on-disk storage.C-performancePerf of queries or internals. Solution not expected to change functional behavior.Perf of queries or internals. Solution not expected to change functional behavior.T-storageStorage TeamStorage Team