Skip to content

storage: support range keys in SSTWriter and sstIterator #82586

@erikgrinaker

Description

@erikgrinaker

We need to handle range keys in SSTs, e.g. for backup/restore and Raft snapshots. In order to do this, we need support for range keys in SSTWriter and sstIterator. This involves implementing the range key methods from the Writer and SimpleMVCCIterator interfaces such that they comply with the interface, and adding tests (iterator tests via TestMVCCHistories).

// ExperimentalPutMVCCRangeKey implements the Writer interface.
func (fw *SSTWriter) ExperimentalPutMVCCRangeKey(MVCCRangeKey, MVCCValue) error {
panic("not implemented")
}
// ExperimentalClearMVCCRangeKey implements the Writer interface.
func (fw *SSTWriter) ExperimentalClearMVCCRangeKey(MVCCRangeKey) error {
panic("not implemented")
}
// ExperimentalClearAllMVCCRangeKeys implements the Writer interface.
func (fw *SSTWriter) ExperimentalClearAllMVCCRangeKeys(roachpb.Key, roachpb.Key) error {
panic("not implemented")
}

// HasPointAndRange implements SimpleMVCCIterator.
func (r *sstIterator) HasPointAndRange() (bool, bool) {
panic("not implemented")
}
// RangeBounds implements SimpleMVCCIterator.
func (r *sstIterator) RangeBounds() roachpb.Span {
panic("not implemented")
}
// RangeKeys implements SimpleMVCCIterator.
func (r *sstIterator) RangeKeys() []MVCCRangeKeyValue {
panic("not implemented")
}

Jira issue: CRDB-16532

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-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions