Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deletion of non-existing keys #23

Merged
merged 2 commits into from
Aug 11, 2017

Commits on Aug 11, 2017

  1. Add a test for deletion of non-existing key

    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>
    pborzenkov authored and Anthony Romano committed Aug 11, 2017
    Configuration menu
    Copy the full SHA
    3c6c3ac View commit details
    Browse the repository at this point in the history
  2. Fix deletion of non-existing keys

    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 boltdb#349
    
    Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
    pborzenkov authored and Anthony Romano committed Aug 11, 2017
    Configuration menu
    Copy the full SHA
    6336a42 View commit details
    Browse the repository at this point in the history