Skip to content

Commit 9416418

Browse files
committed
raftlog: set ReadCategory in iterators
Set the ReadCategory in IterOptions so that iterator stats are categorized appropriately. Informs #158017. Epic: none Release note: None
1 parent ff23cba commit 9416418

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/kv/kvserver/raftlog/iterator.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/cockroachdb/cockroach/pkg/raft/raftpb"
1414
"github.com/cockroachdb/cockroach/pkg/roachpb"
1515
"github.com/cockroachdb/cockroach/pkg/storage"
16+
"github.com/cockroachdb/cockroach/pkg/storage/fs"
1617
"github.com/cockroachdb/cockroach/pkg/util/iterutil"
1718
)
1819

@@ -78,7 +79,8 @@ func NewIterator(
7879
upperBound = prefixBuf.RaftLogKey(opts.Hi)
7980
}
8081
iter, err := eng.NewMVCCIterator(ctx, storage.MVCCKeyIterKind, storage.IterOptions{
81-
UpperBound: upperBound,
82+
UpperBound: upperBound,
83+
ReadCategory: fs.ReplicationReadCategory,
8284
})
8385
if err != nil {
8486
return nil, err

0 commit comments

Comments
 (0)