diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-05-19 12:08:33 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-05-19 12:08:33 -0600 |
commit | 782ead0dbf3095d0e843c2036bf40cc8ecd9b4d1 (patch) | |
tree | 19babfefc617c7f82bc5dcfc287b3f4809a6623a /cursor.go | |
parent | Merge pull request #166 from benbjohnson/fill-percent (diff) | |
download | dedo-782ead0dbf3095d0e843c2036bf40cc8ecd9b4d1.tar.gz dedo-782ead0dbf3095d0e843c2036bf40cc8ecd9b4d1.tar.xz |
Fix freelist allocation direction.
This commit fixes the freelist so that it frees from the beginning of the data file
instead of the end. It also adds a fast path for pages which can be allocated from
the first free pages and it includes read transaction stats.
Diffstat (limited to 'cursor.go')
-rw-r--r-- | cursor.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -193,7 +193,7 @@ func (c *Cursor) last() { func (c *Cursor) search(key []byte, pgid pgid) { p, n := c.bucket.pageNode(pgid) if p != nil { - _assert((p.flags&(branchPageFlag|leafPageFlag)) != 0, "invalid page type: %d: %s", p.id, p.typ()) + _assert((p.flags&(branchPageFlag|leafPageFlag)) != 0, "invalid page type: %d: %x", p.id, p.flags) } e := elemRef{page: p, node: n} c.stack = append(c.stack, e) |