mirror of https://github.com/etcd-io/bbolt.git
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
parent
12923fe56c
commit
ef8e711cfb
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue