diff --git a/pkg/storage/pebble.go b/pkg/storage/pebble.go index d1f2dfadca0b..c98b2a1f3756 100644 --- a/pkg/storage/pebble.go +++ b/pkg/storage/pebble.go @@ -789,8 +789,8 @@ func DefaultPebbleOptions() *pebble.Options { } opts.Experimental.ShortAttributeExtractor = shortAttributeExtractorForValues opts.Experimental.RequiredInPlaceValueBound = pebble.UserKeyPrefixBound{ - Lower: keys.LocalRangeLockTablePrefix, - Upper: keys.LocalRangeLockTablePrefix.PrefixEnd(), + Lower: EncodeMVCCKey(MVCCKey{Key: keys.LocalRangeLockTablePrefix}), + Upper: EncodeMVCCKey(MVCCKey{Key: keys.LocalRangeLockTablePrefix.PrefixEnd()}), } for i := 0; i < len(opts.Levels); i++ { @@ -2360,7 +2360,11 @@ func (p *Pebble) PreIngestDelay(ctx context.Context) { // GetTableMetrics implements the Engine interface. func (p *Pebble) GetTableMetrics(start, end roachpb.Key) ([]enginepb.SSTableMetricsInfo, error) { - tableInfo, err := p.db.SSTables(pebble.WithKeyRangeFilter(start, end), pebble.WithProperties(), pebble.WithApproximateSpanBytes()) + filterOpt := pebble.WithKeyRangeFilter( + EncodeMVCCKey(MVCCKey{Key: start}), + EncodeMVCCKey(MVCCKey{Key: end}), + ) + tableInfo, err := p.db.SSTables(filterOpt, pebble.WithProperties(), pebble.WithApproximateSpanBytes()) if err != nil { return []enginepb.SSTableMetricsInfo{}, err