Commit 534082e9 authored by Steven Allen's avatar Steven Allen

autobatch: don't forget to flush on delete

parent f0357dbc
......@@ -36,6 +36,9 @@ func NewAutoBatching(d ds.Batching, size int) *Datastore {
// Delete deletes a key/value
func (d *Datastore) Delete(k ds.Key) error {
d.buffer[k] = op{delete: true}
if len(d.buffer) > d.maxBufferEntries {
return d.Flush()
}
return nil
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment