Skip to content

Commit

Permalink
Merge pull request #59 from ucwong/dev
Browse files Browse the repository at this point in the history
pebble range fix
  • Loading branch information
ucwong authored Feb 15, 2023
2 parents ce1ed67 + 335cadd commit e8393c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pebble/pebble.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ func (peb *Pebble) Range(start, limit []byte) (res [][]byte) {
iter := peb.engine.NewIter(nil)
defer iter.Close()
for iter.SeekGEWithLimit(start, limit); iter.Valid(); iter.Next() {
res = append(res, common.SafeCopy(nil, iter.Value()))
if bytes.Compare(limit, iter.Key()) > 0 {
res = append(res, common.SafeCopy(nil, iter.Value()))
} else {
break
}
}
return
}
Expand Down

0 comments on commit e8393c3

Please sign in to comment.