-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Is your feature request related to a problem? Please describe
I almost missed that I was creating an iterator with PrefetchValues=false thus:
iterator, err := txn.NewIterator(badger.IteratorOptions{
Prefix: ...
})
… which is not the intended “default” behavior (going on the values of badger.DefaultIteratorOptions).
Describe the solution you'd like
The Options struct has a nice builder where you do:
badger.DefaultOptions("/path/to/db").WithLogger(myCustomLogger)
The IteratorOptions should have something similar:
badger.DefaultIteratorOptions.WithPrefix([]byte("some.prefix."))
Describe alternatives you've considered
I was lucky & manually caught my inadvertent suboptimal use. Others may not be so lucky.
Additional context
Metadata
Metadata
Assignees
Labels
No labels