Merge pull request #9119 from yudai/panic_defrag_fail

mvcc: check null before set FillPercent not to panic
This commit is contained in:
Gyuho Lee 2018-01-08 12:48:48 -08:00 committed by GitHub
commit a1d3456641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -373,10 +373,10 @@ 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
}
tmpb.FillPercent = 0.9 // for seq write in for each
b.ForEach(func(k, v []byte) error {
count++