-
Notifications
You must be signed in to change notification settings - Fork 4.1k
storage: support range keys in SSTWriter and sstIterator #82586
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-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Description
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).
cockroach/pkg/storage/sst_writer.go
Lines 145 to 158 in 44f1ca7
| // 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") | |
| } |
cockroach/pkg/storage/sst_iterator.go
Lines 175 to 188 in 44f1ca7
| // 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
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-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)