Skip to content

Commit cf800bd

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

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/storage/pebble_iterator.go

Lines changed: 3 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"
@@ -227,6 +228,8 @@ func (p *pebbleIterator) setOptions(
227228
KeyTypes: opts.KeyTypes,
228229
UseL6Filters: opts.useL6Filters,
229230
Category: opts.ReadCategory.PebbleCategory(),
231+
// Exempt hot paths from iterator tracking.
232+
ExemptFromTracking: opts.ReadCategory == fs.BatchEvalReadCategory || opts.ReadCategory == fs.ScanRegularBatchEvalReadCategory,
230233
}
231234
p.prefix = opts.Prefix
232235

0 commit comments

Comments
 (0)