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

Keep the last legacy checksums file at the end of restore #8358

Merged

Conversation

imotov
Copy link
Contributor

@imotov imotov commented Nov 6, 2014

This commit fixes the issue caused by restore process deleting all legacy checksum files at the end of restore process. Instead it keeps the latest version of the checksum intact. The issue manifests itself in losing checksum for all legacy files restored into post 1.3.0 cluster, which in turn causes unnecessary snapshotting of files that didn't change.

Fixes #8119

@imotov imotov added :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >bug v1.4.1 v1.5.0 v2.0.0-beta1 labels Nov 6, 2014
@@ -638,6 +638,24 @@ public MetadataSnapshot(Map<String, StoreFileMetaData> metadata) {
}
}

static void cleanLegacyChecksums(Directory directory, long newVersion) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we have a quick javadoc comment what this method does? Not related but I think we should maybe move all these legacy checksum related stuff in it's own inner class and only sync on that class instead of the directory etc.

@s1monw
Copy link
Contributor

s1monw commented Nov 6, 2014

left some comments - good catch btw.

@s1monw
Copy link
Contributor

s1monw commented Nov 6, 2014

I guess this should go into 1.3.x as well?

@imotov imotov added the v1.3.6 label Nov 6, 2014
@imotov
Copy link
Contributor Author

imotov commented Nov 6, 2014

@s1monw, I pushed the updated version. Yes, I think it makes sense to push to 1.3.6 as well if we will release it.

@s1monw
Copy link
Contributor

s1monw commented Nov 6, 2014

LGTM

…estore

 This commit fixes the issue caused by restore process deleting all legacy checksum files at the end of restore process. Instead it keeps the latest version of the checksum intact. The issue manifests itself in losing checksum for all legacy files restored into post 1.3.0 cluster, which in turn causes unnecessary snapshotting of files that didn't change.

Fixes elastic#8119
@imotov imotov force-pushed the issue-8119-legacy-checksum-not-restored branch from 4e90785 to fd8a56d Compare November 18, 2014 02:27
@imotov imotov merged commit fd8a56d into elastic:master Nov 18, 2014
@clintongormley clintongormley changed the title Snapshot/Restore: keep the last legacy checksums file at the end of rest... Keep the last legacy checksums file at the end of restore Jun 8, 2015
@imotov imotov deleted the issue-8119-legacy-checksum-not-restored branch May 1, 2020 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snapshots are taking more place even if no changes happened
2 participants