From 6fae54ee58a6e31db6106d80087f9b0ecd1694b4 Mon Sep 17 00:00:00 2001 From: Tobias Grieger Date: Fri, 20 Sep 2024 16:18:07 +0200 Subject: [PATCH] storage: don't check uncertainty after passing failOnMoreRecent Fixes #119681. Fixes #131005. Epic: none Release note: None --- pkg/storage/pebble_mvcc_scanner.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/storage/pebble_mvcc_scanner.go b/pkg/storage/pebble_mvcc_scanner.go index 4d3ea65695ff..2755fedb6aed 100644 --- a/pkg/storage/pebble_mvcc_scanner.go +++ b/pkg/storage/pebble_mvcc_scanner.go @@ -887,6 +887,7 @@ func (p *pebbleMVCCScanner) getOne(ctx context.Context) (ok, added bool) { if len(p.mostRecentKey) == 0 { p.mostRecentKey = append(p.mostRecentKey, p.curUnsafeKey.Key...) } + // We don't have to fall through to `p.checkUncertainty` because FIXME. return true /* ok */, false } @@ -1527,10 +1528,9 @@ func (p *pebbleMVCCScanner) processRangeKeys(seeked bool, reverse bool) bool { } } } - } - - // Check if any of the range keys are in the uncertainty interval. - if p.checkUncertainty { + // We don't have to fall through to `p.checkUncertainty` because FIXME. + } else if p.checkUncertainty { + // Check if any of the range keys are in the uncertainty interval. for _, version := range p.curRangeKeys.Versions { if version.Timestamp.LessEq(p.ts) { break