diff --git a/kvdb/etcd/readwrite_cursor.go b/kvdb/etcd/readwrite_cursor.go index fb408b8f..123f2a5c 100644 --- a/kvdb/etcd/readwrite_cursor.go +++ b/kvdb/etcd/readwrite_cursor.go @@ -116,23 +116,11 @@ func (c *readWriteCursor) Seek(seek []byte) (key, value []byte) { // invalidating the cursor. Returns ErrIncompatibleValue if attempted // when the cursor points to a nested bucket. func (c *readWriteCursor) Delete() error { - // Get the next key after the current one. We could do this - // after deletion too but it's one step more efficient here. - nextKey, err := c.bucket.tx.stm.Next(c.prefix, c.currKey) - if err != nil { - return err - } - if isBucketKey(c.currKey) { c.bucket.DeleteNestedBucket(getKey(c.currKey)) } else { c.bucket.Delete(getKey(c.currKey)) } - if nextKey != nil { - // Set current key to the next one. - c.currKey = nextKey.key - } - return nil }