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

db.go: clean up file descriptor on init/read failures #89

Merged
merged 2 commits into from
Mar 18, 2018
Merged

db.go: clean up file descriptor on init/read failures #89

merged 2 commits into from
Mar 18, 2018

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Mar 17, 2018

Fixes an issue where failing to open a non-existent database in ReadOnly
mode would make you unable to properly initialize it in ReadWrite mode
afterwards due to a hanging lock.

boltdb/bolt#725

/cc @xiang90 @heyitsanthony

Fixes an issue where failing to open a non-existent database in ReadOnly
mode would make you unable to properly initialize it in ReadWrite mode
afterwards due to a hanging lock.
@codecov-io
Copy link

codecov-io commented Mar 17, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@d57ee90). Click here to learn what that means.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #89   +/-   ##
=========================================
  Coverage          ?   85.47%           
=========================================
  Files             ?        9           
  Lines             ?     1859           
  Branches          ?        0           
=========================================
  Hits              ?     1589           
  Misses            ?      160           
  Partials          ?      110
Impacted Files Coverage Δ
db.go 82.44% <33.33%> (ø)

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 d57ee90...3130a60. Read the comment docs.

Copy link
Contributor

@heyitsanthony heyitsanthony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may want to cover the return nil, ErrInvalid path too

@gyuho gyuho changed the title Clean up file descriptors on failed database initialization db.go: clean up file descriptor on init/read failures Mar 18, 2018
@gyuho gyuho merged commit af9db20 into etcd-io:master Mar 18, 2018
@gyuho gyuho deleted the c1 branch March 18, 2018 00:15
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.

4 participants