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

Calculate Alder32 Checksums for legacy files in Store#checkIntegrity #8407

Merged
merged 1 commit into from Nov 9, 2014

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Nov 9, 2014

Previously we didn't calculate this checksums even though we have a checksum
to compare. Since we now also verify checksums for legacy files #checkIntegrity
should also calculate the legacy checksums.

public static boolean checkIntegrity(final StoreFileMetaData md, final Directory directory) {
try (IndexInput input = directory.openInput(md.name(), IOContext.READONCE)) {
if (md.writtenBy() != null && md.writtenBy().onOrAfter(Version.LUCENE_4_8_0)) {
if (input.length() != md.length()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be moved up above the if, so its always checked?

@s1monw
Copy link
Contributor Author

s1monw commented Nov 9, 2014

@rmuir pushed an update

@rmuir
Copy link
Contributor

rmuir commented Nov 9, 2014

+1

…tegrity

Previously we didn't calculate this checksums even though we have a checksum
to compare. Since we now also verify checksums for legacy files #checkIntegrity
should also calculate the legacy checksums.

Closes elastic#8407
s1monw added a commit to s1monw/elasticsearch that referenced this pull request Nov 9, 2014
…tegrity

Previously we didn't calculate this checksums even though we have a checksum
to compare. Since we now also verify checksums for legacy files #checkIntegrity
should also calculate the legacy checksums.

Closes elastic#8407
s1monw added a commit to s1monw/elasticsearch that referenced this pull request Nov 9, 2014
…tegrity

Previously we didn't calculate this checksums even though we have a checksum
to compare. Since we now also verify checksums for legacy files #checkIntegrity
should also calculate the legacy checksums.

Closes elastic#8407
s1monw added a commit that referenced this pull request Nov 9, 2014
…tegrity

Previously we didn't calculate this checksums even though we have a checksum
to compare. Since we now also verify checksums for legacy files #checkIntegrity
should also calculate the legacy checksums.

Closes #8407
@s1monw s1monw merged commit 2eccbf5 into elastic:master Nov 9, 2014
@s1monw s1monw deleted the integrity_check_legacy branch November 9, 2014 17:40
@clintongormley clintongormley changed the title [STORE] Calculate Alder32 Checksums for legacy files in Store#checkIntegrity Store: Calculate Alder32 Checksums for legacy files in Store#checkIntegrity Nov 25, 2014
@clintongormley clintongormley added :Distributed/Store Issues around managing unopened Lucene indices. If it touches Store.java, this is a likely label. and removed review labels Mar 19, 2015
@clintongormley clintongormley changed the title Store: Calculate Alder32 Checksums for legacy files in Store#checkIntegrity Calculate Alder32 Checksums for legacy files in Store#checkIntegrity Jun 8, 2015
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
…tegrity

Previously we didn't calculate this checksums even though we have a checksum
to compare. Since we now also verify checksums for legacy files #checkIntegrity
should also calculate the legacy checksums.

Closes elastic#8407
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
…tegrity

Previously we didn't calculate this checksums even though we have a checksum
to compare. Since we now also verify checksums for legacy files #checkIntegrity
should also calculate the legacy checksums.

Closes elastic#8407
@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.3.6 v1.4.1 v1.5.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants