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

Support parsing lucene minor version strings #7055

Merged
merged 1 commit into from Jul 28, 2014

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Jul 28, 2014

We parse the version that is shipped with the Lucene segments in order
to find the version of lucene that wrote a particular segment. Yet, some lucene
version ie:

  • 4.3.1 (Elasticsearch 0.90.2)
  • 4.5.1 (Elasticsearch 0.90.7)
  • 3.6.1 (pre Elasticsearch 0.90.0)

wrote illegal strings containing the minor version which causes IAE exceptions
being thrown from lucenes parsing method.

Note: this is a BWC issues that causes replication to fail if the segment was created with on of the broken version and the node is upgraded to Elasticsearch 1.3.0

}
return defaultValue;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The fact that you used an inner class makes me think that you wanted to forbid calls to Version.parseLeniently but I don't see changes to the pom.xml?

@jpountz
Copy link
Contributor

jpountz commented Jul 28, 2014

Left one minor comment. Other than that it looks good.

@s1monw
Copy link
Contributor Author

s1monw commented Jul 28, 2014

good call - I didn't add the pom / signature files :)

We parse the version that is shipped with the Lucene segments in order
to find the version of lucene that wrote a particular segment. Yet, some lucene
version ie:
 * 4.3.1 (Elasticsearch 0.90.2)
 * 4.5.1 (Elasticsearch 0.90.7)
 * 3.6.1 (pre Elasticsearch 0.90.0)

wrote illegal strings containing the minor version which causes IAE exceptions
being thrown from lucenes parsing method.

Closes elastic#7055
@kimchy
Copy link
Member

kimchy commented Jul 28, 2014

LGTM

@s1monw s1monw merged commit d2493ea into elastic:master Jul 28, 2014
s1monw added a commit that referenced this pull request Jul 28, 2014
We parse the version that is shipped with the Lucene segments in order
to find the version of lucene that wrote a particular segment. Yet, some lucene
version ie:
 * 4.3.1 (Elasticsearch 0.90.2)
 * 4.5.1 (Elasticsearch 0.90.7)
 * 3.6.1 (pre Elasticsearch 0.90.0)

wrote illegal strings containing the minor version which causes IAE exceptions
being thrown from lucenes parsing method.

Closes #7055
s1monw added a commit that referenced this pull request Jul 28, 2014
We parse the version that is shipped with the Lucene segments in order
to find the version of lucene that wrote a particular segment. Yet, some lucene
version ie:
 * 4.3.1 (Elasticsearch 0.90.2)
 * 4.5.1 (Elasticsearch 0.90.7)
 * 3.6.1 (pre Elasticsearch 0.90.0)

wrote illegal strings containing the minor version which causes IAE exceptions
being thrown from lucenes parsing method.

Closes #7055
@s1monw
Copy link
Contributor Author

s1monw commented Jul 28, 2014

For reference I opened a Lucene issue for this

@s1monw s1monw deleted the parse_lenient branch July 28, 2014 11:15
s1monw added a commit that referenced this pull request Jul 28, 2014
Pull Request #7055 fixed Version parsing for bugfix releases
causing problems with minor version in segments files. Even though
we never release anything with lucene in alpha / beta status this
commit fixes lenient parsing for these cases.

Relates to #7055
s1monw added a commit that referenced this pull request Jul 28, 2014
Pull Request #7055 fixed Version parsing for bugfix releases
causing problems with minor version in segments files. Even though
we never release anything with lucene in alpha / beta status this
commit fixes lenient parsing for these cases.

Relates to #7055
s1monw added a commit that referenced this pull request Jul 28, 2014
Pull Request #7055 fixed Version parsing for bugfix releases
causing problems with minor version in segments files. Even though
we never release anything with lucene in alpha / beta status this
commit fixes lenient parsing for these cases.

Relates to #7055
@clintongormley clintongormley changed the title [CORE] Support parsing lucene minor version strings Internal: Support parsing lucene minor version strings Jul 28, 2014
@clintongormley clintongormley changed the title Internal: Support parsing lucene minor version strings Support parsing lucene minor version strings Jun 7, 2015
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
We parse the version that is shipped with the Lucene segments in order
to find the version of lucene that wrote a particular segment. Yet, some lucene
version ie:
 * 4.3.1 (Elasticsearch 0.90.2)
 * 4.5.1 (Elasticsearch 0.90.7)
 * 3.6.1 (pre Elasticsearch 0.90.0)

wrote illegal strings containing the minor version which causes IAE exceptions
being thrown from lucenes parsing method.

Closes elastic#7055
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
Pull Request elastic#7055 fixed Version parsing for bugfix releases
causing problems with minor version in segments files. Even though
we never release anything with lucene in alpha / beta status this
commit fixes lenient parsing for these cases.

Relates to elastic#7055
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.

None yet

4 participants