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

Fix scan error deadlock #190

Merged
merged 2 commits into from
Sep 12, 2014
Merged

Fix scan error deadlock #190

merged 2 commits into from
Sep 12, 2014

Conversation

engelsanchez
Copy link
Contributor

If a file scan error happens during a Bitcask open operation, remember
to release the newly created keydir. Before, that keydir was left
behind. Subsequent open operations would see it, see that it was not
ready yet and try to wait for it to load. But this would never happen,
alas.

If a scan error happens on opening a new directory, please release the
newly created keydir so other open operations have a chance to succeed.

This fixes issue #187

The first commit contains a new failing tests to demonstrate, and the
second commit contains the fix.

This test demonstrates that when Bitcask's scan files operation fails,
a keydir object is created, not marked ready and left behind. Subsequent
open operations are unable to succeed because they try to wait for this
existing keydir to be ready when its data loads. But this will never
happen, so sadness ensues.
If a file scan error happens during a Bitcask open operation, remember
to release the newly created keydir.  Before, that keydir was left
behind. Subsequent open operations would see it, see that it was not
ready yet and try to wait for it to load. But this would never happen,
alas.

If a scan error happens on opening a new directory, please release the
newly created keydir so other open operations have a chance to succeed.
@engelsanchez engelsanchez added this to the 2.0.1 milestone Sep 5, 2014
@slfritchie
Copy link
Contributor

+1

@slfritchie
Copy link
Contributor

+1 4862bf6

borshop added a commit that referenced this pull request Sep 12, 2014
Fix scan error deadlock

Reviewed-by: slfritchie
@slfritchie
Copy link
Contributor

@borshop merge

@borshop borshop merged commit 4862bf6 into 1.7 Sep 12, 2014
@seancribbs seancribbs deleted the bugfix/scan-error-deadlock branch April 1, 2015 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants