Skip to content

sstable: index block always loaded; even if unused #3248

@jbowens

Description

@jbowens

The singleLevelIterator and twoLevelIterator init methods both load the the highest index block. When CockroachDB is performing an MVCC Get, this may be unnecessary. If the iterator is only ever used for a call to SeekPrefixGE and the bloom filter is effective, the index block may never be seeked. It's unclear if this is at all impactful, and lazily loading the index block will inevitably add some small overhead and code complexity to seek operations.

Alternatively, we could implement a special Reader.GetPrefix method this optimization and others (#2002), without needing to edit the codepaths for other seek operations.

Jira issue: PEBBLE-116

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions