Fix split root dereference.

This commit fixes a bug that occurs when a root node is split just after a re-mmap occurs.
Previously, this would cause a panic because the new root node would still reference
keys from the old mmap.
master
Ben Johnson 2014-08-21 22:49:58 -06:00
parent 28e80eedb5
commit f088575049
1 changed files with 1 additions and 1 deletions

View File

@ -645,7 +645,7 @@ func (b *Bucket) free() {
// dereference removes all references to the old mmap.
func (b *Bucket) dereference() {
if b.rootNode != nil {
b.rootNode.dereference()
b.rootNode.root().dereference()
}
for _, child := range b.buckets {