Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clientv3: v3Manager#saveDB should always close db file #11838

Merged
merged 1 commit into from
May 4, 2020

Conversation

tedyu
Copy link
Contributor

@tedyu tedyu commented May 2, 2020

In v3Manager#saveDB, db file should always be closed upon return from the method.

Currently if db.Seek() call fails (around line 353), db is not closed.

Signed-off-by: Ted Yu <yuzhihong@gmail.com>
@tedyu tedyu force-pushed the save-db-file-close branch from 2a3635a to 6a97fa8 Compare May 4, 2020 03:38
@codecov-io
Copy link

Codecov Report

Merging #11838 into master will decrease coverage by 0.12%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11838      +/-   ##
==========================================
- Coverage   66.03%   65.90%   -0.13%     
==========================================
  Files         403      403              
  Lines       36993    36999       +6     
==========================================
- Hits        24428    24386      -42     
- Misses      11054    11099      +45     
- Partials     1511     1514       +3     
Impacted Files Coverage Δ
clientv3/snapshot/v3_snapshot.go 59.53% <50.00%> (-0.23%) ⬇️
client/members.go 51.61% <0.00%> (-33.88%) ⬇️
auth/range_perm_cache.go 54.28% <0.00%> (-14.29%) ⬇️
clientv3/naming/grpc.go 63.15% <0.00%> (-12.29%) ⬇️
clientv3/leasing/util.go 91.66% <0.00%> (-6.67%) ⬇️
auth/store.go 52.38% <0.00%> (-6.47%) ⬇️
pkg/adt/interval_tree.go 84.21% <0.00%> (-3.01%) ⬇️
proxy/grpcproxy/watch.go 88.75% <0.00%> (-2.96%) ⬇️
etcdserver/api/v3election/election.go 61.11% <0.00%> (-2.78%) ⬇️
proxy/httpproxy/director.go 65.85% <0.00%> (-2.44%) ⬇️
... and 24 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dfb0a40...6a97fa8. Read the comment docs.

@tedyu
Copy link
Contributor Author

tedyu commented May 4, 2020

@spzala @jingyih
Mind taking a look ?

@xiang90
Copy link
Contributor

xiang90 commented May 4, 2020

lgtm

@xiang90 xiang90 merged commit df1d2ca into etcd-io:master May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants