bptree does not work well for auto-increasing keys

This commit is contained in:
Chris Lu
2021-08-22 18:19:26 -07:00
parent 51c8f2518f
commit df1d6133a8
6 changed files with 193 additions and 28 deletions

View File

@@ -47,7 +47,9 @@ func (self *BpMap) Remove(key ItemKey) (value ItemValue, err error) {
return nil, err
}
if new_root == nil {
self.setRoot(NewLeaf(ns, true))
new_root = NewLeaf(ns, false)
err = new_root.persist()
self.setRoot(new_root)
} else {
self.setRoot(new_root)
}