Skip to content

Commit 1a9f025

Browse files
committed
exempt hot path from iterator tracking
1 parent 6e6bca1 commit 1a9f025

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/storage/pebble_iterator.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313

1414
"github.com/cockroachdb/cockroach/pkg/keys"
1515
"github.com/cockroachdb/cockroach/pkg/roachpb"
16+
"github.com/cockroachdb/cockroach/pkg/storage/fs"
1617
"github.com/cockroachdb/cockroach/pkg/storage/mvccencoding"
1718
"github.com/cockroachdb/cockroach/pkg/storage/pebbleiter"
1819
"github.com/cockroachdb/cockroach/pkg/util"
@@ -228,6 +229,11 @@ func (p *pebbleIterator) setOptions(
228229
UseL6Filters: opts.useL6Filters,
229230
Category: opts.ReadCategory.PebbleCategory(),
230231
}
232+
switch opts.ReadCategory {
233+
case fs.BatchEvalReadCategory, fs.ScanRegularBatchEvalReadCategory, fs.ScanBackgroundBatchEvalReadCategory:
234+
// Exempt hot paths from iterator tracking.
235+
p.options.ExemptFromTracking = true
236+
}
231237
p.prefix = opts.Prefix
232238

233239
if opts.LowerBound != nil {

0 commit comments

Comments
 (0)