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

Use Lucene checksums if segment version is >= 4.9.0 #8599

Merged
merged 1 commit into from Nov 21, 2014

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Nov 21, 2014

We started to use the lucene CRC32 checksums instead of the legacy Adler32
in v1.3.0 which was the first version using lucene 4.9.0. We can safely
assume that if the segment was written with this version that checksums
from lucene can be used even if the legacy checksum claims that it has a Adler32
for a given file / segment.

Closes #8587

NOTE: this PR is against 1.x but will apply to master too but since it needs to pass BWC tests opened it against 1.x

@s1monw s1monw added the review label Nov 21, 2014
@@ -603,6 +603,9 @@ public String toString() {
*/
public final static class MetadataSnapshot implements Iterable<StoreFileMetaData> {
private static final ESLogger logger = Loggers.getLogger(MetadataSnapshot.class);
private static final Version FIRST_LUCENE_CHECkSUM_VERSION = Version.LUCENE_48;
Copy link
Member

Choose a reason for hiding this comment

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

typo: lowercase k?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

g00d catch

@rjernst
Copy link
Member

rjernst commented Nov 21, 2014

LGTM

We started to use the lucene CRC32 checksums instead of the legacy Adler32
in `v1.3.0` which was the first version using lucene `4.9.0`. We can safely
assume that if the segment was written with this version that checksums
from lucene can be used even if the legacy checksum claims that it has a Adler32
for a given file / segment.

Closes elastic#8587
@s1monw s1monw merged commit 088c337 into elastic:1.x Nov 21, 2014
@s1monw s1monw deleted the fix_legacy_checksums branch November 21, 2014 21:40
@clintongormley clintongormley changed the title [STORE] Use Lucene checksums if segment version is >= 4.9.0 Store: Use Lucene checksums if segment version is >= 4.9.0 Nov 25, 2014
@clintongormley clintongormley added >bug v1.4.1 v1.5.0 v2.0.0-beta1 :Distributed/Store Issues around managing unopened Lucene indices. If it touches Store.java, this is a likely label. labels Nov 25, 2014
@s1monw s1monw added v1.4.5 and removed v1.4.1 labels Mar 17, 2015
@clintongormley clintongormley changed the title Store: Use Lucene checksums if segment version is >= 4.9.0 Use Lucene checksums if segment version is >= 4.9.0 Jun 8, 2015
@clintongormley clintongormley added :Distributed/Engine Anything around managing Lucene and the Translog in an open shard. and removed :Distributed/Store Issues around managing unopened Lucene indices. If it touches Store.java, this is a likely label. labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed/Engine Anything around managing Lucene and the Translog in an open shard. resiliency v1.4.5 v1.5.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants