From 54b5232ea426726027cac6b93878221a66304376 Mon Sep 17 00:00:00 2001 From: Erik Grinaker Date: Sun, 1 May 2022 13:32:47 +0000 Subject: [PATCH] storage: rename `Writer.Clear*Range` methods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This renames the `Clear*Range` methods on `Writer` in an attempt to clarify their semantics, keeping their upcoming range key effects in mind. * `ClearMVCCRange` → `ClearMVCCVersions` (only point key versions) * `ClearMVCCRangeAndIntents` → `ClearMVCCRange` (everything in span) * `ClearIterRange` → `ClearMVCCIteratorRange` (uses `MVCCIterator`) Release note: None --- pkg/kv/kvserver/abortspan/abortspan.go | 2 +- pkg/kv/kvserver/batch_spanset_test.go | 28 ++++++++-------- pkg/kv/kvserver/batcheval/cmd_clear_range.go | 4 +-- .../batcheval/cmd_clear_range_test.go | 8 ++--- pkg/kv/kvserver/spanset/batch.go | 12 +++---- pkg/storage/bench_pebble_test.go | 8 ++--- pkg/storage/engine.go | 33 +++++++++---------- pkg/storage/engine_test.go | 8 ++--- pkg/storage/intent_reader_writer.go | 11 +++---- pkg/storage/intent_reader_writer_test.go | 2 +- pkg/storage/metamorphic/operations.go | 2 +- pkg/storage/mvcc.go | 4 +-- pkg/storage/mvcc_history_test.go | 2 +- pkg/storage/pebble.go | 23 +++++++------ pkg/storage/pebble_batch.go | 12 +++---- pkg/storage/sst_writer.go | 16 ++++----- 16 files changed, 84 insertions(+), 91 deletions(-) diff --git a/pkg/kv/kvserver/abortspan/abortspan.go b/pkg/kv/kvserver/abortspan/abortspan.go index 55b020b6675e..792b5ab7beb5 100644 --- a/pkg/kv/kvserver/abortspan/abortspan.go +++ b/pkg/kv/kvserver/abortspan/abortspan.go @@ -78,7 +78,7 @@ func (sc *AbortSpan) max() roachpb.Key { func (sc *AbortSpan) ClearData(e storage.Engine) error { b := e.NewUnindexedBatch(false /* writeOnly */) defer b.Close() - if err := b.ClearIterRange(sc.min(), sc.max()); err != nil { + if err := b.ClearMVCCIteratorRange(sc.min(), sc.max()); err != nil { return err } return b.Commit(false /* sync */) diff --git a/pkg/kv/kvserver/batch_spanset_test.go b/pkg/kv/kvserver/batch_spanset_test.go index 8358853170b6..58c690ca5b4b 100644 --- a/pkg/kv/kvserver/batch_spanset_test.go +++ b/pkg/kv/kvserver/batch_spanset_test.go @@ -72,43 +72,43 @@ func TestSpanSetBatchBoundaries(t *testing.T) { t.Run("writes before range", func(t *testing.T) { if err := batch.ClearUnversioned(outsideKey.Key); !isWriteSpanErr(err) { - t.Errorf("Clear: unexpected error %v", err) + t.Errorf("ClearUnversioned: unexpected error %v", err) } if err := batch.ClearRawRange(outsideKey.Key, outsideKey2.Key); !isWriteSpanErr(err) { - t.Errorf("ClearRange: unexpected error %v", err) + t.Errorf("ClearRawRange: unexpected error %v", err) } { - err := batch.ClearIterRange(outsideKey.Key, outsideKey2.Key) + err := batch.ClearMVCCIteratorRange(outsideKey.Key, outsideKey2.Key) if !isWriteSpanErr(err) { - t.Errorf("ClearIterRange: unexpected error %v", err) + t.Errorf("ClearMVCCIteratorRange: unexpected error %v", err) } } if err := batch.Merge(outsideKey, nil); !isWriteSpanErr(err) { t.Errorf("Merge: unexpected error %v", err) } if err := batch.PutUnversioned(outsideKey.Key, nil); !isWriteSpanErr(err) { - t.Errorf("Put: unexpected error %v", err) + t.Errorf("PutUnversioned: unexpected error %v", err) } }) t.Run("writes after range", func(t *testing.T) { if err := batch.ClearUnversioned(outsideKey3.Key); !isWriteSpanErr(err) { - t.Errorf("Clear: unexpected error %v", err) + t.Errorf("ClearUnversioned: unexpected error %v", err) } if err := batch.ClearRawRange(insideKey2.Key, outsideKey4.Key); !isWriteSpanErr(err) { - t.Errorf("ClearRange: unexpected error %v", err) + t.Errorf("ClearRawRange: unexpected error %v", err) } { - err := batch.ClearIterRange(outsideKey2.Key, outsideKey4.Key) + err := batch.ClearMVCCIteratorRange(outsideKey2.Key, outsideKey4.Key) if !isWriteSpanErr(err) { - t.Errorf("ClearIterRange: unexpected error %v", err) + t.Errorf("ClearMVCCIteratorRange: unexpected error %v", err) } } if err := batch.Merge(outsideKey3, nil); !isWriteSpanErr(err) { t.Errorf("Merge: unexpected error %v", err) } if err := batch.PutUnversioned(outsideKey3.Key, nil); !isWriteSpanErr(err) { - t.Errorf("Put: unexpected error %v", err) + t.Errorf("PutUnversioned: unexpected error %v", err) } }) @@ -318,19 +318,19 @@ func TestSpanSetBatchTimestamps(t *testing.T) { for _, batch := range []storage.Batch{batchBefore, batchNonMVCC} { if err := batch.ClearUnversioned(wkey.Key); !isWriteSpanErr(err) { - t.Errorf("Clear: unexpected error %v", err) + t.Errorf("ClearUnversioned: unexpected error %v", err) } { - err := batch.ClearIterRange(wkey.Key, wkey.Key) + err := batch.ClearMVCCIteratorRange(wkey.Key, wkey.Key) if !isWriteSpanErr(err) { - t.Errorf("ClearIterRange: unexpected error %v", err) + t.Errorf("ClearMVCCIteratorRange: unexpected error %v", err) } } if err := batch.Merge(wkey, nil); !isWriteSpanErr(err) { t.Errorf("Merge: unexpected error %v", err) } if err := batch.PutUnversioned(wkey.Key, nil); !isWriteSpanErr(err) { - t.Errorf("Put: unexpected error %v", err) + t.Errorf("PutUnversioned: unexpected error %v", err) } } diff --git a/pkg/kv/kvserver/batcheval/cmd_clear_range.go b/pkg/kv/kvserver/batcheval/cmd_clear_range.go index 89667309f4e9..9565a4007992 100644 --- a/pkg/kv/kvserver/batcheval/cmd_clear_range.go +++ b/pkg/kv/kvserver/batcheval/cmd_clear_range.go @@ -116,13 +116,13 @@ func ClearRange( if statsDelta.ContainsEstimates == 0 && statsDelta.Total() < ClearRangeBytesThreshold { log.VEventf(ctx, 2, "delta=%d < threshold=%d; using non-range clear", statsDelta.Total(), ClearRangeBytesThreshold) - if err = readWriter.ClearIterRange(from, to); err != nil { + if err = readWriter.ClearMVCCIteratorRange(from, to); err != nil { return result.Result{}, err } return pd, nil } - if err := readWriter.ClearMVCCRangeAndIntents(from, to); err != nil { + if err := readWriter.ClearMVCCRange(from, to); err != nil { return result.Result{}, err } return pd, nil diff --git a/pkg/kv/kvserver/batcheval/cmd_clear_range_test.go b/pkg/kv/kvserver/batcheval/cmd_clear_range_test.go index 45ab490327f1..97f90f03c61d 100644 --- a/pkg/kv/kvserver/batcheval/cmd_clear_range_test.go +++ b/pkg/kv/kvserver/batcheval/cmd_clear_range_test.go @@ -35,14 +35,14 @@ type wrappedBatch struct { clearRangeCount int } -func (wb *wrappedBatch) ClearIterRange(start, end roachpb.Key) error { +func (wb *wrappedBatch) ClearMVCCIteratorRange(start, end roachpb.Key) error { wb.clearIterCount++ - return wb.Batch.ClearIterRange(start, end) + return wb.Batch.ClearMVCCIteratorRange(start, end) } -func (wb *wrappedBatch) ClearMVCCRangeAndIntents(start, end roachpb.Key) error { +func (wb *wrappedBatch) ClearMVCCRange(start, end roachpb.Key) error { wb.clearRangeCount++ - return wb.Batch.ClearMVCCRangeAndIntents(start, end) + return wb.Batch.ClearMVCCRange(start, end) } // TestCmdClearRangeBytesThreshold verifies that clear range resorts to diff --git a/pkg/kv/kvserver/spanset/batch.go b/pkg/kv/kvserver/spanset/batch.go index b33d99d11672..8a1ed5e94712 100644 --- a/pkg/kv/kvserver/spanset/batch.go +++ b/pkg/kv/kvserver/spanset/batch.go @@ -588,25 +588,25 @@ func (s spanSetWriter) ClearRawRange(start, end roachpb.Key) error { return s.w.ClearRawRange(start, end) } -func (s spanSetWriter) ClearMVCCRangeAndIntents(start, end roachpb.Key) error { +func (s spanSetWriter) ClearMVCCRange(start, end roachpb.Key) error { if err := s.checkAllowedRange(start, end); err != nil { return err } - return s.w.ClearMVCCRangeAndIntents(start, end) + return s.w.ClearMVCCRange(start, end) } -func (s spanSetWriter) ClearMVCCRange(start, end storage.MVCCKey) error { +func (s spanSetWriter) ClearMVCCVersions(start, end storage.MVCCKey) error { if err := s.checkAllowedRange(start.Key, end.Key); err != nil { return err } - return s.w.ClearMVCCRange(start, end) + return s.w.ClearMVCCVersions(start, end) } -func (s spanSetWriter) ClearIterRange(start, end roachpb.Key) error { +func (s spanSetWriter) ClearMVCCIteratorRange(start, end roachpb.Key) error { if err := s.checkAllowedRange(start, end); err != nil { return err } - return s.w.ClearIterRange(start, end) + return s.w.ClearMVCCIteratorRange(start, end) } func (s spanSetWriter) ExperimentalPutMVCCRangeKey(rangeKey storage.MVCCRangeKey) error { diff --git a/pkg/storage/bench_pebble_test.go b/pkg/storage/bench_pebble_test.go index 5d9d3eee3fdc..43e91b702d8d 100644 --- a/pkg/storage/bench_pebble_test.go +++ b/pkg/storage/bench_pebble_test.go @@ -329,18 +329,18 @@ func BenchmarkMVCCDeleteRange_Pebble(b *testing.B) { } } -func BenchmarkClearMVCCRange_Pebble(b *testing.B) { +func BenchmarkClearMVCCVersions_Pebble(b *testing.B) { skip.UnderShort(b) ctx := context.Background() runClearRange(ctx, b, setupMVCCPebble, func(eng Engine, batch Batch, start, end MVCCKey) error { - return batch.ClearMVCCRange(start, end) + return batch.ClearMVCCVersions(start, end) }) } -func BenchmarkClearIterRange_Pebble(b *testing.B) { +func BenchmarkClearMVCCIteratorRange_Pebble(b *testing.B) { ctx := context.Background() runClearRange(ctx, b, setupMVCCPebble, func(eng Engine, batch Batch, start, end MVCCKey) error { - return batch.ClearIterRange(start.Key, end.Key) + return batch.ClearMVCCIteratorRange(start.Key, end.Key) }) } diff --git a/pkg/storage/engine.go b/pkg/storage/engine.go index 6c9ccd3eae64..f5fd079e7dd9 100644 --- a/pkg/storage/engine.go +++ b/pkg/storage/engine.go @@ -612,32 +612,29 @@ type Writer interface { // // It is safe to modify the contents of the arguments after it returns. ClearRawRange(start, end roachpb.Key) error - // ClearMVCCRangeAndIntents removes MVCC keys and intents from start (inclusive) - // to end (exclusive). This is a higher-level method that handles both - // interleaved and separated intents. Similar to the other Clear* methods, - // this method actually removes entries from the storage engine. + // ClearMVCCRange removes MVCC keys from start (inclusive) to end (exclusive), + // including intents. Similar to the other Clear* methods, this method + // actually removes entries from the storage engine. // // It is safe to modify the contents of the arguments after it returns. // // TODO(erikgrinaker): This should clear range keys too. - ClearMVCCRangeAndIntents(start, end roachpb.Key) error - // ClearMVCCRange removes MVCC keys from start (inclusive) to end - // (exclusive). It should not be expected to clear intents, though may clear - // interleaved intents that it encounters. It is meant for efficiently - // clearing a subset of versions of a key, since the parameters are MVCCKeys - // and not roachpb.Keys. Similar to the other Clear* methods, this method - // actually removes entries from the storage engine. + ClearMVCCRange(start, end roachpb.Key) error + // ClearMVCCVersions removes MVCC point key versions from start (inclusive) to + // end (exclusive). It does not affect intents nor range keys. It is meant for + // efficiently clearing a subset of versions of a key, since the parameters + // are MVCCKeys and not roachpb.Keys. Similar to the other Clear* methods, + // this method actually removes entries from the storage engine. // // It is safe to modify the contents of the arguments after it returns. - ClearMVCCRange(start, end MVCCKey) error - - // ClearIterRange removes all keys in the given span using an iterator to - // iterate over point keys and remove them from the storage engine using - // per-key storage tombstones (not MVCC tombstones). Any separated - // intents/locks will also be cleared. + ClearMVCCVersions(start, end MVCCKey) error + // ClearMVCCIteratorRange removes all keys in the given span using an MVCC + // iterator and clearing individual point keys (including intents). Similar to + // the other Clear* methods, this method actually removes entries from the + // storage engine. // // TODO(erikgrinaker): This should clear range keys too. - ClearIterRange(start, end roachpb.Key) error + ClearMVCCIteratorRange(start, end roachpb.Key) error // ExperimentalClearMVCCRangeKey deletes an MVCC range key from start // (inclusive) to end (exclusive) at the given timestamp. For any range key diff --git a/pkg/storage/engine_test.go b/pkg/storage/engine_test.go index 911d44f1dce0..ff23550ff27b 100644 --- a/pkg/storage/engine_test.go +++ b/pkg/storage/engine_test.go @@ -988,7 +988,7 @@ func TestEngineDeleteRange(t *testing.T) { defer leaktest.AfterTest(t)() defer log.Scope(t).Close(t) testEngineDeleteRange(t, func(engine Engine, start, end MVCCKey) error { - return engine.ClearMVCCRange(start, end) + return engine.ClearMVCCVersions(start, end) }) } @@ -998,7 +998,7 @@ func TestEngineDeleteRangeBatch(t *testing.T) { testEngineDeleteRange(t, func(engine Engine, start, end MVCCKey) error { batch := engine.NewUnindexedBatch(true /* writeOnly */) defer batch.Close() - if err := batch.ClearMVCCRange(start, end); err != nil { + if err := batch.ClearMVCCVersions(start, end); err != nil { return err } batch2 := engine.NewUnindexedBatch(true /* writeOnly */) @@ -1010,11 +1010,11 @@ func TestEngineDeleteRangeBatch(t *testing.T) { }) } -func TestEngineDeleteIterRange(t *testing.T) { +func TestEngineDeleteRangeIterator(t *testing.T) { defer leaktest.AfterTest(t)() defer log.Scope(t).Close(t) testEngineDeleteRange(t, func(engine Engine, start, end MVCCKey) error { - return engine.ClearIterRange(start.Key, end.Key) + return engine.ClearMVCCIteratorRange(start.Key, end.Key) }) } diff --git a/pkg/storage/intent_reader_writer.go b/pkg/storage/intent_reader_writer.go index e2c908d4575c..3dee527a7542 100644 --- a/pkg/storage/intent_reader_writer.go +++ b/pkg/storage/intent_reader_writer.go @@ -68,13 +68,10 @@ func (idw intentDemuxWriter) PutIntent( return buf, idw.w.PutEngineKey(engineKey, value) } -// ClearMVCCRangeAndIntents has the same behavior as -// Writer.ClearMVCCRangeAndIntents. buf is used as scratch-space to avoid -// allocations -- its contents will be overwritten and not appended to, and a -// possibly different buf returned. -func (idw intentDemuxWriter) ClearMVCCRangeAndIntents( - start, end roachpb.Key, buf []byte, -) ([]byte, error) { +// ClearMVCCRange has the same behavior as Writer.ClearMVCCRange. buf is used as +// scratch-space to avoid allocations -- its contents will be overwritten and +// not appended to, and a possibly different buf returned. +func (idw intentDemuxWriter) ClearMVCCRange(start, end roachpb.Key, buf []byte) ([]byte, error) { err := idw.w.ClearRawRange(start, end) if err != nil { return buf, err diff --git a/pkg/storage/intent_reader_writer_test.go b/pkg/storage/intent_reader_writer_test.go index baab535d195a..bb7473457f6f 100644 --- a/pkg/storage/intent_reader_writer_test.go +++ b/pkg/storage/intent_reader_writer_test.go @@ -246,7 +246,7 @@ func TestIntentDemuxWriter(t *testing.T) { pw.reset() start := scanRoachKey(t, d, "start") end := scanRoachKey(t, d, "end") - if scratch, err = w.ClearMVCCRangeAndIntents(start, end, scratch); err != nil { + if scratch, err = w.ClearMVCCRange(start, end, scratch); err != nil { return err.Error() } printEngContents(&pw.b, eng) diff --git a/pkg/storage/metamorphic/operations.go b/pkg/storage/metamorphic/operations.go index 9e52e9b5aee4..a4f9dac6834f 100644 --- a/pkg/storage/metamorphic/operations.go +++ b/pkg/storage/metamorphic/operations.go @@ -688,7 +688,7 @@ func (c clearRangeOp) run(ctx context.Context) string { // Empty range. No-op. return "no-op due to no non-conflicting key range" } - err := c.m.engine.ClearMVCCRangeAndIntents(c.key, c.endKey) + err := c.m.engine.ClearMVCCRange(c.key, c.endKey) if err != nil { return fmt.Sprintf("error: %s", err.Error()) } diff --git a/pkg/storage/mvcc.go b/pkg/storage/mvcc.go index d08670868eb1..418d7eb648b4 100644 --- a/pkg/storage/mvcc.go +++ b/pkg/storage/mvcc.go @@ -2036,7 +2036,7 @@ func MVCCClearTimeRange( flushClearedKeys := func(nonMatch MVCCKey) error { if len(clearRangeStart.Key) != 0 { - if err := rw.ClearMVCCRange(clearRangeStart, nonMatch); err != nil { + if err := rw.ClearMVCCVersions(clearRangeStart, nonMatch); err != nil { return err } batchByteSize += int64(clearRangeStart.EncodedSize() + nonMatch.EncodedSize()) @@ -2051,7 +2051,7 @@ func MVCCClearTimeRange( // clearrange, the byte size of the keys we did get is now too large to // encode them all within the byte size limit, so use clearrange anyway. if batchByteSize+encodedBufSize >= maxBatchByteSize { - if err := rw.ClearMVCCRange(buf[0], nonMatch); err != nil { + if err := rw.ClearMVCCVersions(buf[0], nonMatch); err != nil { return err } batchByteSize += int64(buf[0].EncodedSize() + nonMatch.EncodedSize()) diff --git a/pkg/storage/mvcc_history_test.go b/pkg/storage/mvcc_history_test.go index b0cf29329d91..4e1665dde2d4 100644 --- a/pkg/storage/mvcc_history_test.go +++ b/pkg/storage/mvcc_history_test.go @@ -667,7 +667,7 @@ func cmdCheckIntent(e *evalCtx) error { func cmdClearRange(e *evalCtx) error { key, endKey := e.getKeyRange() - return e.engine.ClearMVCCRangeAndIntents(key, endKey) + return e.engine.ClearMVCCRange(key, endKey) } func cmdCPut(e *evalCtx) error { diff --git a/pkg/storage/pebble.go b/pkg/storage/pebble.go index 901afad311ae..2c085dbb6d0b 100644 --- a/pkg/storage/pebble.go +++ b/pkg/storage/pebble.go @@ -1213,15 +1213,14 @@ func (p *Pebble) ClearRawRange(start, end roachpb.Key) error { return p.clearRange(MVCCKey{Key: start}, MVCCKey{Key: end}) } -// ClearMVCCRangeAndIntents implements the Engine interface. -func (p *Pebble) ClearMVCCRangeAndIntents(start, end roachpb.Key) error { - _, err := p.wrappedIntentWriter.ClearMVCCRangeAndIntents(start, end, nil) +// ClearMVCCRange implements the Engine interface. +func (p *Pebble) ClearMVCCRange(start, end roachpb.Key) error { + _, err := p.wrappedIntentWriter.ClearMVCCRange(start, end, nil) return err - } -// ClearMVCCRange implements the Engine interface. -func (p *Pebble) ClearMVCCRange(start, end MVCCKey) error { +// ClearMVCCVersions implements the Engine interface. +func (p *Pebble) ClearMVCCVersions(start, end MVCCKey) error { return p.clearRange(start, end) } @@ -1231,13 +1230,13 @@ func (p *Pebble) clearRange(start, end MVCCKey) error { return p.db.DeleteRange(bufStart, bufEnd, pebble.Sync) } -// ClearIterRange implements the Engine interface. -func (p *Pebble) ClearIterRange(start, end roachpb.Key) error { +// ClearMVCCIteratorRange implements the Engine interface. +func (p *Pebble) ClearMVCCIteratorRange(start, end roachpb.Key) error { // Write all the tombstones in one batch. batch := p.NewUnindexedBatch(false /* writeOnly */) defer batch.Close() - if err := batch.ClearIterRange(start, end); err != nil { + if err := batch.ClearMVCCIteratorRange(start, end); err != nil { return err } return batch.Commit(true) @@ -2091,15 +2090,15 @@ func (p *pebbleReadOnly) ClearRawRange(start, end roachpb.Key) error { panic("not implemented") } -func (p *pebbleReadOnly) ClearMVCCRangeAndIntents(start, end roachpb.Key) error { +func (p *pebbleReadOnly) ClearMVCCRange(start, end roachpb.Key) error { panic("not implemented") } -func (p *pebbleReadOnly) ClearMVCCRange(start, end MVCCKey) error { +func (p *pebbleReadOnly) ClearMVCCVersions(start, end MVCCKey) error { panic("not implemented") } -func (p *pebbleReadOnly) ClearIterRange(start, end roachpb.Key) error { +func (p *pebbleReadOnly) ClearMVCCIteratorRange(start, end roachpb.Key) error { panic("not implemented") } diff --git a/pkg/storage/pebble_batch.go b/pkg/storage/pebble_batch.go index 9dfdde3b210b..655b9c36b4f3 100644 --- a/pkg/storage/pebble_batch.go +++ b/pkg/storage/pebble_batch.go @@ -366,15 +366,15 @@ func (p *pebbleBatch) ClearRawRange(start, end roachpb.Key) error { return p.clearRange(MVCCKey{Key: start}, MVCCKey{Key: end}) } -// ClearMVCCRangeAndIntents implements the Batch interface. -func (p *pebbleBatch) ClearMVCCRangeAndIntents(start, end roachpb.Key) error { +// ClearMVCCRange implements the Batch interface. +func (p *pebbleBatch) ClearMVCCRange(start, end roachpb.Key) error { var err error - p.scratch, err = p.wrappedIntentWriter.ClearMVCCRangeAndIntents(start, end, p.scratch) + p.scratch, err = p.wrappedIntentWriter.ClearMVCCRange(start, end, p.scratch) return err } -// ClearMVCCRange implements the Batch interface. -func (p *pebbleBatch) ClearMVCCRange(start, end MVCCKey) error { +// ClearMVCCVersions implements the Batch interface. +func (p *pebbleBatch) ClearMVCCVersions(start, end MVCCKey) error { return p.clearRange(start, end) } @@ -385,7 +385,7 @@ func (p *pebbleBatch) clearRange(start, end MVCCKey) error { } // ClearIterRange implements the Batch interface. -func (p *pebbleBatch) ClearIterRange(start, end roachpb.Key) error { +func (p *pebbleBatch) ClearMVCCIteratorRange(start, end roachpb.Key) error { iter := p.NewMVCCIterator(MVCCKeyAndIntentsIterKind, IterOptions{ LowerBound: start, UpperBound: end, diff --git a/pkg/storage/sst_writer.go b/pkg/storage/sst_writer.go index 0938af17484a..be9dd72b0f1e 100644 --- a/pkg/storage/sst_writer.go +++ b/pkg/storage/sst_writer.go @@ -132,13 +132,13 @@ func (fw *SSTWriter) ClearRawRange(start, end roachpb.Key) error { return fw.clearRange(MVCCKey{Key: start}, MVCCKey{Key: end}) } -// ClearMVCCRangeAndIntents implements the Writer interface. -func (fw *SSTWriter) ClearMVCCRangeAndIntents(start, end roachpb.Key) error { - panic("ClearMVCCRangeAndIntents is unsupported") +// ClearMVCCRange implements the Writer interface. +func (fw *SSTWriter) ClearMVCCRange(start, end roachpb.Key) error { + panic("not implemented") } -// ClearMVCCRange implements the Writer interface. -func (fw *SSTWriter) ClearMVCCRange(start, end MVCCKey) error { +// ClearMVCCVersions implements the Writer interface. +func (fw *SSTWriter) ClearMVCCVersions(start, end MVCCKey) error { return fw.clearRange(start, end) } @@ -299,9 +299,9 @@ func (fw *SSTWriter) SingleClearEngineKey(key EngineKey) error { panic("unimplemented") } -// ClearIterRange implements the Writer interface. -func (fw *SSTWriter) ClearIterRange(start, end roachpb.Key) error { - panic("ClearIterRange is unsupported") +// ClearMVCCIteratorRange implements the Writer interface. +func (fw *SSTWriter) ClearMVCCIteratorRange(start, end roachpb.Key) error { + panic("not implemented") } // Merge implements the Writer interface.