Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go.mod: bump Pebble to 8801607debb0 #108864

Merged
merged 2 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1595,10 +1595,10 @@ def go_deps():
patches = [
"@com_github_cockroachdb_cockroach//build/patches:com_github_cockroachdb_pebble.patch",
],
sha256 = "fea9844c8d46dd2c0bde835e0b329a94b855a12c37cb857cca08db0f9e7e9152",
strip_prefix = "github.com/cockroachdb/[email protected]20230811190520-77e81e806c8b",
sha256 = "887f199034b84fb2a4c7cf90c9ea908f288de7545581e8273eadd5b0e9103c5e",
strip_prefix = "github.com/cockroachdb/[email protected]20230814213059-8801607debb0",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20230811190520-77e81e806c8b.zip",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20230814213059-8801607debb0.zip",
],
)
go_repository(
Expand Down
2 changes: 1 addition & 1 deletion build/bazelutil/distdir_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ DISTDIR_FILES = {
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/go-test-teamcity/com_github_cockroachdb_go_test_teamcity-v0.0.0-20191211140407-cff980ad0a55.zip": "bac30148e525b79d004da84d16453ddd2d5cd20528e9187f1d7dac708335674b",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/gostdlib/com_github_cockroachdb_gostdlib-v1.19.0.zip": "c4d516bcfe8c07b6fc09b8a9a07a95065b36c2855627cb3514e40c98f872b69e",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/logtags/com_github_cockroachdb_logtags-v0.0.0-20230118201751-21c54148d20b.zip": "ca7776f47e5fecb4c495490a679036bfc29d95bd7625290cfdb9abb0baf97476",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20230811190520-77e81e806c8b.zip": "fea9844c8d46dd2c0bde835e0b329a94b855a12c37cb857cca08db0f9e7e9152",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20230814213059-8801607debb0.zip": "887f199034b84fb2a4c7cf90c9ea908f288de7545581e8273eadd5b0e9103c5e",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/redact/com_github_cockroachdb_redact-v1.1.5.zip": "11b30528eb0dafc8bc1a5ba39d81277c257cbe6946a7564402f588357c164560",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/returncheck/com_github_cockroachdb_returncheck-v0.0.0-20200612231554-92cdbca611dd.zip": "ce92ba4352deec995b1f2eecf16eba7f5d51f5aa245a1c362dfe24c83d31f82b",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/sentry-go/com_github_cockroachdb_sentry_go-v0.6.1-cockroachdb.2.zip": "fbb2207d02aecfdd411b1357efe1192dbb827959e36b7cab7491731ac55935c9",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ require (
github.com/cockroachdb/go-test-teamcity v0.0.0-20191211140407-cff980ad0a55
github.com/cockroachdb/gostdlib v1.19.0
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b
github.com/cockroachdb/pebble v0.0.0-20230811190520-77e81e806c8b
github.com/cockroachdb/pebble v0.0.0-20230814213059-8801607debb0
github.com/cockroachdb/redact v1.1.5
github.com/cockroachdb/returncheck v0.0.0-20200612231554-92cdbca611dd
github.com/cockroachdb/stress v0.0.0-20220803192808-1806698b1b7b
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,8 @@ github.com/cockroachdb/gostdlib v1.19.0/go.mod h1:+dqqpARXbE/gRDEhCak6dm0l14AaTy
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE=
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
github.com/cockroachdb/pebble v0.0.0-20230811190520-77e81e806c8b h1:IqusT4xdwUaQlyCLnBlMOg0LgQYh9fRn0MHyvtW+plw=
github.com/cockroachdb/pebble v0.0.0-20230811190520-77e81e806c8b/go.mod h1:EDjiaAXc0FXiRmxDzcu1wIEJ093ohHMUWxrI6iku0XA=
github.com/cockroachdb/pebble v0.0.0-20230814213059-8801607debb0 h1:7WVNPZYo498YQMBGGusMUOBqUSZNHOgg7mS41e/spLY=
github.com/cockroachdb/pebble v0.0.0-20230814213059-8801607debb0/go.mod h1:EDjiaAXc0FXiRmxDzcu1wIEJ093ohHMUWxrI6iku0XA=
github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30=
github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
Expand Down
3 changes: 2 additions & 1 deletion pkg/ccl/backupccl/full_cluster_backup_restore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,10 @@ CREATE TABLE data2.foo (a int);
store := tcRestore.GetFirstStoreFromServer(t, 0)
startKey := keys.SystemSQLCodec.TablePrefix(uint32(id))
endKey := startKey.PrefixEnd()
it := store.TODOEngine().NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{
it, err := store.TODOEngine().NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{
UpperBound: endKey,
})
require.NoError(t, err)
defer it.Close()
it.SeekGE(storage.MVCCKey{Key: startKey})
hasKey, err := it.Valid()
Expand Down
3 changes: 2 additions & 1 deletion pkg/ccl/backupccl/restore_data_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ func slurpSSTablesLatestKey(
}

var kvs []storage.MVCCKeyValue
it := batch.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{UpperBound: roachpb.KeyMax})
it, err := batch.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{UpperBound: roachpb.KeyMax})
require.NoError(t, err)
defer it.Close()
for it.SeekGE(start); ; it.NextKey() {
if ok, err := it.Valid(); err != nil {
Expand Down
11 changes: 7 additions & 4 deletions pkg/ccl/storageccl/engineccl/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func loadTestData(
func runIterate(
b *testing.B,
loadFactor float32,
makeIterator func(storage.Engine, hlc.Timestamp, hlc.Timestamp) storage.MVCCIterator,
makeIterator func(storage.Engine, hlc.Timestamp, hlc.Timestamp) (storage.MVCCIterator, error),
) {
const numKeys = 100000
const numBatches = 100
Expand All @@ -149,7 +149,10 @@ func runIterate(
if endTime.IsEmpty() {
endTime = endTime.Next()
}
it := makeIterator(eng, startTime, endTime)
it, err := makeIterator(eng, startTime, endTime)
if err != nil {
b.Fatal(err)
}
defer it.Close()
for it.SeekGE(storage.MVCCKey{Key: keys.LocalMax}); ; it.Next() {
if ok, err := it.Valid(); !ok {
Expand All @@ -172,12 +175,12 @@ func BenchmarkTimeBoundIterate(b *testing.B) {
for _, loadFactor := range []float32{1.0, 0.5, 0.1, 0.05, 0.0} {
b.Run(fmt.Sprintf("LoadFactor=%.2f", loadFactor), func(b *testing.B) {
b.Run("NormalIterator", func(b *testing.B) {
runIterate(b, loadFactor, func(e storage.Engine, _, _ hlc.Timestamp) storage.MVCCIterator {
runIterate(b, loadFactor, func(e storage.Engine, _, _ hlc.Timestamp) (storage.MVCCIterator, error) {
return e.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{UpperBound: roachpb.KeyMax})
})
})
b.Run("TimeBoundIterator", func(b *testing.B) {
runIterate(b, loadFactor, func(e storage.Engine, startTime, endTime hlc.Timestamp) storage.MVCCIterator {
runIterate(b, loadFactor, func(e storage.Engine, startTime, endTime hlc.Timestamp) (storage.MVCCIterator, error) {
return e.NewMVCCIterator(storage.MVCCKeyIterKind, storage.IterOptions{
MinTimestampHint: startTime,
MaxTimestampHint: endTime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,16 @@ func assertExactlyEqualKVs(
) hlc.Timestamp {
// Iterate over the store.
store := tc.GetFirstStoreFromServer(t, 0)
it := store.TODOEngine().NewMVCCIterator(storage.MVCCKeyIterKind, storage.IterOptions{
it, err := store.TODOEngine().NewMVCCIterator(storage.MVCCKeyIterKind, storage.IterOptions{
LowerBound: tenantPrefix,
UpperBound: tenantPrefix.PrefixEnd(),
})
if err != nil {
t.Fatal(err)
}
defer it.Close()
var prevKey roachpb.Key
var valueTimestampTuples []roachpb.KeyValue
var err error
var maxKVTimestampSeen hlc.Timestamp
var matchingKVs int
for it.SeekGE(storage.MVCCKey{}); ; it.Next() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,13 @@ func assertEqualKVs(
// Iterate over the store.
store, err := srv.GetStores().(*kvserver.Stores).GetStore(srv.GetFirstStoreID())
require.NoError(t, err)
it := store.TODOEngine().NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{
it, err := store.TODOEngine().NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{
LowerBound: targetSpan.Key,
UpperBound: targetSpan.EndKey,
})
if err != nil {
t.Fatal(err)
}
defer it.Close()
var prevKey roachpb.Key
var valueTimestampTuples []roachpb.KeyValue
Expand Down
5 changes: 4 additions & 1 deletion pkg/cli/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -1272,10 +1272,13 @@ func runDebugIntentCount(cmd *cobra.Command, args []string) error {
}
})

iter := db.NewEngineIterator(storage.IterOptions{
iter, err := db.NewEngineIterator(storage.IterOptions{
LowerBound: keys.LockTableSingleKeyStart,
UpperBound: keys.LockTableSingleKeyEnd,
})
if err != nil {
return err
}
defer iter.Close()
seekKey := storage.EngineKey{Key: keys.LockTableSingleKeyStart}

Expand Down
11 changes: 9 additions & 2 deletions pkg/kv/kvnemesis/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ func (e *Engine) Get(key roachpb.Key, ts hlc.Timestamp) roachpb.Value {
Suffix: storage.EncodeMVCCTimestampSuffix(ts),
},
}
iter := e.kvs.NewIter(&opts)
iter, err := e.kvs.NewIter(&opts)
if err != nil {
panic(err)
}
defer func() { _ = iter.Close() }()
iter.SeekGE(storage.EncodeMVCCKey(storage.MVCCKey{Key: key, Timestamp: ts}))
for iter.Valid() {
Expand Down Expand Up @@ -126,7 +129,11 @@ func (e *Engine) DeleteRange(from, to roachpb.Key, ts hlc.Timestamp, val []byte)
func (e *Engine) Iterate(
fn func(key, endKey roachpb.Key, ts hlc.Timestamp, value []byte, err error),
) {
iter := e.kvs.NewIter(&pebble.IterOptions{KeyTypes: pebble.IterKeyTypePointsAndRanges})
iter, err := e.kvs.NewIter(&pebble.IterOptions{KeyTypes: pebble.IterKeyTypePointsAndRanges})
if err != nil {
fn(nil, nil, hlc.Timestamp{}, nil, err)
return
}
defer func() { _ = iter.Close() }()
for iter.First(); iter.Valid(); iter.Next() {
hasPoint, _ := iter.HasPointAndRange()
Expand Down
10 changes: 8 additions & 2 deletions pkg/kv/kvnemesis/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1308,11 +1308,14 @@ func validReadTimes(b *pebble.Batch, key roachpb.Key, value []byte) disjointTime
var hist []storage.MVCCValue
lowerBound := storage.EncodeMVCCKey(storage.MVCCKey{Key: key})
upperBound := storage.EncodeMVCCKey(storage.MVCCKey{Key: key.Next()})
iter := b.NewIter(&pebble.IterOptions{
iter, err := b.NewIter(&pebble.IterOptions{
KeyTypes: storage.IterKeyTypePointsAndRanges,
LowerBound: lowerBound,
UpperBound: upperBound,
})
if err != nil {
panic(err)
}
defer func() { _ = iter.Close() }()

iter.SeekGE(lowerBound)
Expand Down Expand Up @@ -1436,7 +1439,10 @@ func validScanTime(b *pebble.Batch, span roachpb.Span, kvs []roachpb.KeyValue) m
// Note that this iterator ignores MVCC range deletions. We use this iterator
// only to *discover* point keys; we then invoke validReadTimes for each of
// them which *does* take into account MVCC range deletions.
iter := b.NewIter(nil)
iter, err := b.NewIter(nil)
if err != nil {
panic(err)
}
defer func() { _ = iter.Close() }()

iter.SeekGE(storage.EncodeMVCCKey(storage.MVCCKey{Key: span.Key}))
Expand Down
37 changes: 30 additions & 7 deletions pkg/kv/kvserver/batch_spanset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ func TestSpanSetBatchBoundaries(t *testing.T) {
})

t.Run("forward scans", func(t *testing.T) {
iter := batch.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{UpperBound: roachpb.KeyMax})
iter, err := batch.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{UpperBound: roachpb.KeyMax})
if err != nil {
t.Fatal(err)
}
defer iter.Close()

// MVCCIterators check boundaries on seek and next/prev
Expand Down Expand Up @@ -199,7 +202,12 @@ func TestSpanSetBatchBoundaries(t *testing.T) {
}

t.Run("reverse scans", func(t *testing.T) {
iter := spanset.NewIterator(eng.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{UpperBound: roachpb.KeyMax}), &ss)
innerIter, err := eng.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{UpperBound: roachpb.KeyMax})
if err != nil {
t.Fatal(err)
}
iter := spanset.NewIterator(innerIter, &ss)

defer iter.Close()
iter.SeekLT(outsideKey4)
if _, err := iter.Valid(); !isReadSpanErr(err) {
Expand Down Expand Up @@ -383,7 +391,10 @@ func TestSpanSetIteratorTimestamps(t *testing.T) {

func() {
// When accessing at t=1, we're able to read through latches declared at t=1 and t=2.
iter := batchAt1.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{UpperBound: roachpb.KeyMax})
iter, err := batchAt1.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{UpperBound: roachpb.KeyMax})
if err != nil {
t.Fatal(err)
}
defer iter.Close()

iter.SeekGE(k1)
Expand All @@ -405,7 +416,10 @@ func TestSpanSetIteratorTimestamps(t *testing.T) {

func() {
// When accessing at t=2, we're only able to read through the latch declared at t=2.
iter := batchAt2.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{UpperBound: roachpb.KeyMax})
iter, err := batchAt2.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{UpperBound: roachpb.KeyMax})
if err != nil {
t.Fatal(err)
}
defer iter.Close()

iter.SeekGE(k1)
Expand All @@ -425,7 +439,10 @@ func TestSpanSetIteratorTimestamps(t *testing.T) {
for _, batch := range []storage.Batch{batchAt3, batchNonMVCC} {
// When accessing at t=3, we're unable to read through any of the declared latches.
// Same is true when accessing without a timestamp.
iter := batch.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{UpperBound: roachpb.KeyMax})
iter, err := batch.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{UpperBound: roachpb.KeyMax})
if err != nil {
t.Fatal(err)
}
defer iter.Close()

iter.SeekGE(k1)
Expand All @@ -442,7 +459,10 @@ func TestSpanSetIteratorTimestamps(t *testing.T) {
// The behavior is the same as above for an EngineIterator.
func() {
// When accessing at t=1, we're able to read through latches declared at t=1 and t=2.
iter := batchAt1.NewEngineIterator(storage.IterOptions{UpperBound: roachpb.KeyMax})
iter, err := batchAt1.NewEngineIterator(storage.IterOptions{UpperBound: roachpb.KeyMax})
if err != nil {
t.Fatal(err)
}
defer iter.Close()

if ok, err := iter.SeekEngineKeyGE(k1e); !ok {
Expand Down Expand Up @@ -470,7 +490,10 @@ func TestSpanSetIteratorTimestamps(t *testing.T) {

func() {
// When accessing at t=2, we're only able to read through the latch declared at t=2.
iter := batchAt2.NewEngineIterator(storage.IterOptions{UpperBound: roachpb.KeyMax})
iter, err := batchAt2.NewEngineIterator(storage.IterOptions{UpperBound: roachpb.KeyMax})
if err != nil {
t.Fatal(err)
}
defer iter.Close()

if ok, _ := iter.SeekEngineKeyGE(k1e); ok {
Expand Down
5 changes: 4 additions & 1 deletion pkg/kv/kvserver/batcheval/cmd_add_sstable.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,13 +404,16 @@ func EvalAddSSTable(
// addition, and instead just use this key-only iterator. If a caller actually
// needs to know what data is there, it must issue its own real Scan.
if args.ReturnFollowingLikelyNonEmptySpanStart {
existingIter := spanset.DisableReaderAssertions(readWriter).NewMVCCIterator(
existingIter, err := spanset.DisableReaderAssertions(readWriter).NewMVCCIterator(
storage.MVCCKeyIterKind, // don't care if it is committed or not, just that it isn't empty.
storage.IterOptions{
KeyTypes: storage.IterKeyTypePointsAndRanges,
UpperBound: reply.RangeSpan.EndKey,
},
)
if err != nil {
return result.Result{}, errors.Wrap(err, "error when creating iterator for non-empty span")
}
defer existingIter.Close()
existingIter.SeekGE(end)
if ok, err := existingIter.Valid(); err != nil {
Expand Down
5 changes: 4 additions & 1 deletion pkg/kv/kvserver/batcheval/cmd_clear_range.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,14 @@ func computeStatsDelta(
if !entireRange {
leftPeekBound, rightPeekBound := rangeTombstonePeekBounds(
from, to, desc.StartKey.AsRawKey(), desc.EndKey.AsRawKey())
rkIter := readWriter.NewMVCCIterator(storage.MVCCKeyIterKind, storage.IterOptions{
rkIter, err := readWriter.NewMVCCIterator(storage.MVCCKeyIterKind, storage.IterOptions{
KeyTypes: storage.IterKeyTypeRangesOnly,
LowerBound: leftPeekBound,
UpperBound: rightPeekBound,
})
if err != nil {
return enginepb.MVCCStats{}, err
}
defer rkIter.Close()

if cmp, lhs, err := storage.PeekRangeKeysLeft(rkIter, from); err != nil {
Expand Down
5 changes: 4 additions & 1 deletion pkg/kv/kvserver/batcheval/cmd_clear_range_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,14 @@ func TestCmdClearRange(t *testing.T) {
require.Equal(t, tc.expClearIter, batch.clearIterCount == 1)

// Ensure that the data is gone.
iter := eng.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{
iter, err := eng.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{
KeyTypes: storage.IterKeyTypePointsAndRanges,
LowerBound: startKey,
UpperBound: endKey,
})
if err != nil {
t.Fatal(err)
}
defer iter.Close()
iter.SeekGE(storage.MVCCKey{Key: keys.LocalMax})
ok, err := iter.Valid()
Expand Down
10 changes: 8 additions & 2 deletions pkg/kv/kvserver/batcheval/cmd_delete_range_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,14 @@ func TestDeleteRangeTombstone(t *testing.T) {
// operated on. The command should not have written an actual rangekey!
func checkPredicateDeleteRange(t *testing.T, engine storage.Reader, rKeyInfo storage.MVCCRangeKey) {

iter := engine.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{
iter, err := engine.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{
KeyTypes: storage.IterKeyTypePointsAndRanges,
LowerBound: rKeyInfo.StartKey,
UpperBound: rKeyInfo.EndKey,
})
if err != nil {
t.Fatal(err)
}
defer iter.Close()

for iter.SeekGE(storage.MVCCKey{Key: rKeyInfo.StartKey}); ; iter.NextKey() {
Expand Down Expand Up @@ -345,11 +348,14 @@ func checkDeleteRangeTombstone(
written bool,
now hlc.ClockTimestamp,
) {
iter := engine.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{
iter, err := engine.NewMVCCIterator(storage.MVCCKeyAndIntentsIterKind, storage.IterOptions{
KeyTypes: storage.IterKeyTypeRangesOnly,
LowerBound: rangeKey.StartKey,
UpperBound: rangeKey.EndKey,
})
if err != nil {
t.Fatal(err)
}
defer iter.Close()
iter.SeekGE(storage.MVCCKey{Key: rangeKey.StartKey})

Expand Down
5 changes: 4 additions & 1 deletion pkg/kv/kvserver/batcheval/cmd_end_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -1410,11 +1410,14 @@ func computeSplitRangeKeyStatsDelta(
splitKey.Prevish(roachpb.PrevishKeyLength), splitKey.Next(),
lhs.StartKey.AsRawKey(), rhs.EndKey.AsRawKey())

iter := r.NewMVCCIterator(storage.MVCCKeyIterKind, storage.IterOptions{
iter, err := r.NewMVCCIterator(storage.MVCCKeyIterKind, storage.IterOptions{
KeyTypes: storage.IterKeyTypeRangesOnly,
LowerBound: leftPeekBound,
UpperBound: rightPeekBound,
})
if err != nil {
return ms, err
}
defer iter.Close()

if cmp, rangeKeys, err := storage.PeekRangeKeysRight(iter, splitKey); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/batcheval/cmd_export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ func exportUsingGoIterator(
return nil, nil
}

iter := storage.NewMVCCIncrementalIterator(reader, storage.MVCCIncrementalIterOptions{
iter := storage.NewMVCCIncrementalIterator(reader.(storage.ReaderWithMustIterators), storage.MVCCIncrementalIterOptions{
EndKey: endKey,
StartTime: startTime,
EndTime: endTime,
Expand Down
Loading