Skip to content

Commit 88d86d2

Browse files
committed
address review comments
1 parent e5ae317 commit 88d86d2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

storage/operation/badgerimpl/iterator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var _ storage.Iterator = (*badgerIterator)(nil)
1919

2020
func newBadgerIterator(db *badger.DB, startPrefix, endPrefix []byte, ops storage.IteratorOption) *badgerIterator {
2121
options := badger.DefaultIteratorOptions
22-
if ops.IterateKeyOnly {
22+
if ops.BadgerIterateKeyOnly {
2323
options.PrefetchValues = false
2424
}
2525

storage/operations.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ type IterItem interface {
5656
}
5757

5858
type IteratorOption struct {
59-
IterateKeyOnly bool // default false
59+
BadgerIterateKeyOnly bool // default false
6060
}
6161

6262
func DefaultIteratorOptions() IteratorOption {
6363
return IteratorOption{
64-
IterateKeyOnly: false, // only needed for badger. ignored by pebble
64+
// only needed for badger. ignored by pebble
65+
BadgerIterateKeyOnly: false,
6566
}
6667
}
6768

0 commit comments

Comments
 (0)