diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-03-25 07:25:00 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-03-25 07:25:00 -0600 |
commit | d8e4cffa12444da138a4fd0f67dfd665844c9912 (patch) | |
tree | cc264fcba99bdb9fd0d5ccb3af0c2bfd18a012dc /tx_test.go | |
parent | Merge pull request #88 from benbjohnson/tx-rename (diff) | |
download | dedo-d8e4cffa12444da138a4fd0f67dfd665844c9912.tar.gz dedo-d8e4cffa12444da138a4fd0f67dfd665844c9912.tar.xz |
Fix bucket reclamation.
The bucket page is allocated separately from the rest of the pages but the old bucket pages were
not being added to the freelist. This change fixes that and adds a simple check for database
consistency. More advanced consistency checks can be added in the future.
Fixes #82.
Diffstat (limited to 'tx_test.go')
-rw-r--r-- | tx_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -230,7 +230,7 @@ func TestTxDeleteBucket(t *testing.T) { db.Update(func(tx *Tx) error { // Verify that the bucket's page is free. - assert.Equal(t, []pgid{root}, db.freelist.all()) + assert.Equal(t, []pgid{6, root, 3}, db.freelist.all()) // Create the bucket again and make sure there's not a phantom value. assert.NoError(t, tx.CreateBucket("widgets")) |