Set FillPercent=1.0 in 'bolt compact'.

By default, pages are split when they reach half full. For 'bolt compact' we want to fill the entire page for maximum compaction.
pull/22/head
dogben 2017-06-11 18:52:05 -04:00 committed by Anthony Romano
parent 12923fe56c
commit ef8e711cfb
1 changed files with 3 additions and 0 deletions

View File

@ -1664,6 +1664,9 @@ func (cmd *CompactCommand) compact(dst, src *bolt.DB) error {
}
}
// Fill the entire page for best compaction.
b.FillPercent = 1.0
// If there is no value then this is a bucket call.
if v == nil {
bkt, err := b.CreateBucket(k)