Catch assertion errors on commit and turn it into a real exception#19357
Merged
s1monw merged 1 commit intoelastic:masterfrom Jul 11, 2016
Merged
Catch assertion errors on commit and turn it into a real exception#19357s1monw merged 1 commit intoelastic:masterfrom
s1monw merged 1 commit intoelastic:masterfrom
Conversation
Lucene IndexWriter asserts on files existing on the filesystem but some tests throw IOException explicitly on those operatiosn such that some tests trip asserts. We had this before on InternalEngine#ctor and added some logic there to catch only a specific assertions based on some excepition stack analysis. This change applies the same logic to the IndexWriter#commit part of the engine since it can hit the same issue. This also fixes a self-suppression issue in Store.java. Closes elastic#19356
Contributor
Author
|
@mikemccand can you take a look |
Contributor
|
LGTM, nice find. Maybe we should fix IW to throw |
Contributor
Author
|
++ to upgrade this assertion to a hard check and throw CIE? |
Contributor
|
OK I just removed these assertions from IW entirely: apache/lucene-solr@044aabf Turns out they are not needed anymore because the low level APIs IW is using in Lucene were improved themselves to catch these cases even w/o assertions enabled. So when we upgrade to Lucene 6.2 we can remove the unwrapping of |
Contributor
Author
|
AWESOME! thanks mike |
This file contains hidden or 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
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.
Lucene IndexWriter asserts on files existing on the filesystem but
some tests throw IOException explicitly on those operatiosn such that
some tests trip asserts. We had this before on InternalEngine#ctor
and added some logic there to catch only a specific assertions based
on some excepition stack analysis. This change applies the same logic
to the IndexWriter#commit part of the engine since it can hit the same
issue.
This also fixes a self-suppression issue in Store.java.
Closes #19356