Skip to content

Commit

Permalink
Use pebble types and interfaces correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerwilliams committed Jun 18, 2024
1 parent 2e425f4 commit 8cf4252
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/logdb/kv/pebble/kv_pebble.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func openPebbleDB(config config.LogDBConfig, callback kv.LogDBCallback,
}
})
blockSize := int(config.KVBlockSize)
writeBufferSize := int(config.KVWriteBufferSize)
writeBufferSize := uint64(config.KVWriteBufferSize)
maxWriteBufferNumber := int(config.KVMaxWriteBufferNumber)
l0FileNumCompactionTrigger := int(config.KVLevel0FileNumCompactionTrigger)
l0StopWritesTrigger := int(config.KVLevel0StopWritesTrigger)
Expand Down Expand Up @@ -277,7 +277,10 @@ func iteratorIsValid(iter *pebble.Iterator) bool {
// IterateValue ...
func (r *KV) IterateValue(fk []byte, lk []byte, inc bool,
op func(key []byte, data []byte) (bool, error)) (err error) {
iter := r.db.NewIter(r.ro)
iter, err := r.db.NewIter(r.ro)
if err != nil {
return err
}
defer func() {
err = firstError(err, iter.Close())
}()
Expand Down

0 comments on commit 8cf4252

Please sign in to comment.