Skip to content

storage: optimize pointSynthesizingIter initialization  #84380

@erikgrinaker

Description

@erikgrinaker

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:

// 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

Metadata

Metadata

Assignees

Labels

A-kv-replicationRelating to Raft, consensus, and coordination.A-storageRelating to our storage engine (Pebble) on-disk storage.C-performancePerf of queries or internals. Solution not expected to change functional behavior.T-storageStorage Team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions