Skip to content

Commit

Permalink
Merge pull request #7553 from xiang90/fix_defrag
Browse files Browse the repository at this point in the history
backend: add FillPercent option
  • Loading branch information
xiang90 authored Mar 21, 2017
2 parents cd70ea3 + 95870a2 commit 7698a2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mvcc/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ func defragdb(odb, tmpdb *bolt.DB, limit int) error {
}

tmpb, berr := tmptx.CreateBucketIfNotExists(next)
tmpb.FillPercent = 0.9 // for seq write in for each
if berr != nil {
return berr
}
Expand All @@ -331,6 +332,8 @@ func defragdb(odb, tmpdb *bolt.DB, limit int) error {
return err
}
tmpb = tmptx.Bucket(next)
tmpb.FillPercent = 0.9 // for seq write in for each

count = 0
}
return tmpb.Put(k, v)
Expand Down

0 comments on commit 7698a2a

Please sign in to comment.