#753·bolt

Cursor.Last() 对于非空桶返回 nil

作者: Hittorp创建于 2018年4月27日更新于 2018年4月27日

有时在删除一组数据后,新的 Cursor 会为非空的分桶返回 nil。可复现的代码是 这里。 也许只需在 (n *node) del(key []byte) 的末尾添加 n.rebalance() 就可以解决这个问题。