aboutsummaryrefslogtreecommitdiff
path: root/db.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-05-09 09:38:08 -0600
committerBen Johnson <benbjohnson@yahoo.com>2014-05-09 09:38:08 -0600
commitd1b21e619d11001e069ba793bb023951cd6f15fd (patch)
tree058209a444636914495eaa47621d7811a11156c0 /db.go
parentFix deletion reclamation. (diff)
parentFix node unit tests. (diff)
downloaddedo-d1b21e619d11001e069ba793bb023951cd6f15fd.tar.gz
dedo-d1b21e619d11001e069ba793bb023951cd6f15fd.tar.xz
Merge branch 'master' of https://github.com/boltdb/bolt into fix-deletion
Conflicts: node.go
Diffstat (limited to 'db.go')
-rw-r--r--db.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/db.go b/db.go
index d96a161..0b74621 100644
--- a/db.go
+++ b/db.go
@@ -705,6 +705,10 @@ func (m *meta) copy(dest *meta) {
// write writes the meta onto a page.
func (m *meta) write(p *page) {
+
+ _assert(m.root.root < m.pgid, "root bucket pgid (%d) above high water mark (%d)", m.root.root, m.pgid)
+ _assert(m.freelist < m.pgid, "freelist pgid (%d) above high water mark (%d)", m.freelist, m.pgid)
+
// Page id is either going to be 0 or 1 which we can determine by the transaction ID.
p.id = pgid(m.txid % 2)
p.flags |= metaPageFlag