commit
59a860988b
1 changed files with 4 additions and 0 deletions
|
@ -60,6 +60,10 @@ func reap(db *bolt.DB, options Options, quitC <-chan struct{}, doneC chan<- stru
|
|||
}
|
||||
|
||||
if options.BatchSize == i {
|
||||
// Store the current key to the previous key.
|
||||
// Copy the byte slice key, because this data is
|
||||
// not safe outside of this transaction.
|
||||
prevKey = make([]byte, len(k))
|
||||
copy(prevKey, k)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue