-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Open
Labels
area/performancebackport/v3.5priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.Important over the long term, but may not be staffed and/or may need multiple releases to complete.type/bug
Description
Bug report criteria
- This bug report is not security related, security issues should be disclosed privately via etcd maintainers.
- This is not a support request or question, support requests or questions should be raised in the etcd discussion forums.
- You have read the etcd bug reporting guidelines.
- Existing open issues along with etcd frequently asked questions have been checked and this is not a duplicate.
What happened?
file is being opened here
etcd/client/v3/snapshot/v3_snapshot.go
Line 63 in 9914047
| f, err = os.OpenFile(partpath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, fileutil.PrivateFileMode) |
but being closed only here
etcd/client/v3/snapshot/v3_snapshot.go
Line 87 in 9914047
| if err = f.Close(); err != nil { |
Between these lines errors can be occured and file won't be closed
What did you expect to happen?
There should close function invocation via defer
How can we reproduce it (as minimally and precisely as possible)?
Check code
Anything else we need to know?
Etcd version (please run commands below)
latest
Etcd configuration (command line flags or environment variables)
Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)
Relevant log output
-Metadata
Metadata
Assignees
Labels
area/performancebackport/v3.5priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.Important over the long term, but may not be staffed and/or may need multiple releases to complete.type/bug