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

Cursor.Last() returns nil for non-empty bucket #753

Open
Hittorp opened this issue Apr 27, 2018 · 0 comments
Open

Cursor.Last() returns nil for non-empty bucket #753

Hittorp opened this issue Apr 27, 2018 · 0 comments

Comments

@Hittorp
Copy link

Hittorp commented Apr 27, 2018

Sometimes after a bunch of deletes Last() for new cursor returns nil for non-empty bucket. Code to reproduce is here.

May be it's enough to put n.rebalance() at the end of (n *node) del(key []byte) to fix this.

Hi @benbjohnson,
Could you please confirm the solution?

I am not sure about invariants that should provide cursor.Delete(). Is it ok to get an empty leaf page after delete a key?

Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant