From c3400efefdf9733e98cb125d00a0c0721a2db51e Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Thu, 24 Jul 2014 10:36:09 -0600 Subject: Change fill percent to be per-bucket. This commit moves the DB.FillPercent field to Bucket.FillPercent. This allows the fill percentage to be specified per-bucket, per-tx. This value is not persisted and should be set whenever using it. --- bucket_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bucket_test.go') diff --git a/bucket_test.go b/bucket_test.go index 99fdad8..029ff2b 100644 --- a/bucket_test.go +++ b/bucket_test.go @@ -674,8 +674,6 @@ func TestBucket_Stats_RandomFill(t *testing.T) { } withOpenDB(func(db *DB, path string) { - db.FillPercent = 0.9 - // Add a set of values in random order. It will be the same random // order so we can maintain consistency between test runs. var count int @@ -683,6 +681,7 @@ func TestBucket_Stats_RandomFill(t *testing.T) { for _, i := range r.Perm(1000) { db.Update(func(tx *Tx) error { b, _ := tx.CreateBucketIfNotExists([]byte("woojits")) + b.FillPercent = 0.9 for _, j := range r.Perm(100) { index := (j * 10000) + i b.Put([]byte(fmt.Sprintf("%d000000000000000", index)), []byte("0000000000")) -- cgit v1.2.3