Skip to content
This repository has been archived by the owner on Mar 9, 2019. It is now read-only.

Fix deletion of non-existing keys #660

Closed
wants to merge 2 commits into from
Closed

Fix deletion of non-existing keys #660

wants to merge 2 commits into from

Conversation

pborzenkov
Copy link

Change Bucket.Delete to do what its doc comment says in a case of non-existing keys, e.g. nothing.
This pull request fixes #349

As of now the test fails and tries to delete the next key returned by
the cursor, which happens to be a nested bucket. That's why Delete is
fails.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Doc for Bucket.Delete says that a Delete() on non-existing key is a
no-op. Right now it tries to delete the next key returned by the
cursor. Fix this by checking for key equivalence before deletion.

 Fixes #349

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting a non-existing key throws ErrIncompatibleValue
2 participants