#753·bolt

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

Author: HittorpCreated Apr 27, 2018Updated 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.