Merge pull request #11631 from jingyih/automated-cherry-pick-of-#11630-upstream-release-3.4

Automated cherry pick of #11630 to release-3.4
This commit is contained in:
Jingyi Hu 2020-02-16 08:35:23 +08:00 committed by GitHub
commit c10168f718
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -376,7 +376,10 @@ func (b *backend) defrag() error {
if err != nil {
return err
}
options := *boltOpenOptions
options := bolt.Options{}
if boltOpenOptions != nil {
options = *boltOpenOptions
}
options.OpenFile = func(path string, i int, mode os.FileMode) (file *os.File, err error) {
return temp, nil
}