mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #11630 from jingyih/check_nil_before_use_boltOpenOptions
mvcc/backend: check for nil boltOpenOptions
This commit is contained in:
commit
f0faa5501d
@ -365,7 +365,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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user