diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-06-03 13:21:28 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-06-03 13:40:24 -0600 |
commit | 54cad40a785deddda2d4b903f048fdfb43a94927 (patch) | |
tree | c4d06f342b5e53d5eea7a34d3d5138db74f26b15 /freelist.go | |
parent | Allow split nodes to be merged with the next node. (diff) | |
download | dedo-54cad40a785deddda2d4b903f048fdfb43a94927.tar.gz dedo-54cad40a785deddda2d4b903f048fdfb43a94927.tar.xz |
Fix merge-split spill issues.
Diffstat (limited to 'freelist.go')
-rw-r--r-- | freelist.go | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/freelist.go b/freelist.go index 2fa4a94..a236079 100644 --- a/freelist.go +++ b/freelist.go @@ -70,14 +70,12 @@ func (f *freelist) allocate(n int) pgid { // free releases a page and its overflow for a given transaction id. // If the page is already free then a panic will occur. func (f *freelist) free(txid txid, p *page) { - warn("free:", txid, p.id, p.overflow) _assert(p.id > 1, "cannot free page 0 or 1: %d", p.id) // Verify that page is not already free. minid, maxid := p.id, p.id+pgid(p.overflow) for _, id := range f.ids { if id >= minid && id <= maxid { - warn(" ‡", id, "|", minid, maxid) panic(fmt.Sprintf("page %d already freed in tx", id)) } } @@ -92,9 +90,6 @@ func (f *freelist) free(txid txid, p *page) { // Free page and all its overflow pages. var ids = f.pending[txid] for i := 0; i < int(p.overflow+1); i++ { - if p.id+pgid(i) == 55 { - warn(" •", txid, p.id+pgid(i)) - } ids = append(ids, p.id+pgid(i)) } f.pending[txid] = ids |