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
Core: Don't forcefully release IW lock (this can cause corruption) #8892
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1432,11 +1432,6 @@ private static boolean isMergedSegment(AtomicReader reader) { | |||
|
|||
private IndexWriter createWriter() throws IOException { | |||
try { | |||
// release locks when started |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huge +1
+1 I left a comment about the test fixes |
mikemccand
added a commit
that referenced
this pull request
Dec 11, 2014
It's dangerous to release this lock because it means another ES somehow still has an IndexWriter open on the directory, which can lead to corruption. Instead, we don't release the lock, and the user will see an exception on init. This was already fixed on master with #8588; I'm backporting to 1.x here. Closes #8892
mikemccand
added a commit
that referenced
this pull request
Dec 11, 2014
It's dangerous to release this lock because it means another ES somehow still has an IndexWriter open on the directory, which can lead to corruption. Instead, we don't release the lock, and the user will see an exception on init. This was already fixed on master with #8588; I'm backporting to 1.x here. Closes #8892
mikemccand
added a commit
that referenced
this pull request
Dec 11, 2014
It's dangerous to release this lock because it means another ES somehow still has an IndexWriter open on the directory, which can lead to corruption. Instead, we don't release the lock, and the user will see an exception on init. This was already fixed on master with #8588; I'm backporting to 1.x here. Closes #8892
clintongormley
changed the title
Core: don't forcefully release IW lock (this can cause corruption)
Core: Don't forcefully release IW lock (this can cause corruption)
Dec 16, 2014
clintongormley
added
:Core/Infra/Core
Core issues without another label
and removed
review
labels
Mar 19, 2015
mute
pushed a commit
to mute/elasticsearch
that referenced
this pull request
Jul 29, 2015
It's dangerous to release this lock because it means another ES somehow still has an IndexWriter open on the directory, which can lead to corruption. Instead, we don't release the lock, and the user will see an exception on init. This was already fixed on master with elastic#8588; I'm backporting to 1.x here. Closes elastic#8892
mute
pushed a commit
to mute/elasticsearch
that referenced
this pull request
Jul 29, 2015
It's dangerous to release this lock because it means another ES somehow still has an IndexWriter open on the directory, which can lead to corruption. Instead, we don't release the lock, and the user will see an exception on init. This was already fixed on master with elastic#8588; I'm backporting to 1.x here. Closes elastic#8892
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes the test failure at http://build-us-00.elasticsearch.org/job/es_core_1x_strong/1652/
I already fixed this in master with #8588 but I think we should back-port even though it's a behavior change: it's really dangerous to forcefully remove IW's lock on init (it can quickly cause index corruption as it did in this test failure, caught by our check index on close).
If the index is in fact locked it means somehow another ES instance is still open/writing to that store directory and it's better to get an exc saying that.