Commit 82516f58 authored by Steven Allen's avatar Steven Allen

fix autobatch delete from buffer error

parent 10b34df0
......@@ -30,9 +30,14 @@ func NewAutoBatching(d ds.Batching, size int) *Datastore {
// Delete deletes a key/value
func (d *Datastore) Delete(k ds.Key) error {
_, found := d.buffer[k]
delete(d.buffer, k)
return d.child.Delete(k)
err := d.child.Delete(k)
if found && err == ds.ErrNotFound {
return nil
}
return err
}
// Get retrieves a value given a key.
......
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