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

Fix Snapshot Repository Corruption in Downgrade Scenarios (#50692) #50797

Merged
merged 2 commits into from
Jan 9, 2020

Conversation

original-brownbear
Copy link
Member

This PR introduces test infrastructure for downgrading a cluster while interacting with a given repository.
It fixes the fact that repository metadata in the new format could be written while there's still older snapshots in the repository that require the old-format metadata to be restorable.

backport of #50692

)

This PR introduces test infrastructure for downgrading a cluster while interacting with a given repository.
It fixes the fact that repository metadata in the new format could be written while there's still older snapshots in the repository that require the old-format metadata to be restorable.
@original-brownbear original-brownbear added :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs backport labels Jan 9, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore)

@original-brownbear
Copy link
Member Author

@ywelsch @tlrx could I get a quick sanity check on the change I had to make here to make things work in 7.x (change relative to master is: 524af67)

Since 6.x can't read index metadata from 7.x (this worked across master and 7.x by chance) we can't load the snapshot status for a 7.x snapshot from a 6.x cluster because we can't determine the shard count per index from the metadata. Fixed this by simply not doing the status check in this case which I guess is fine, there's no way we could support that kind of BwC for the index metadata.

Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

LGTM

@original-brownbear
Copy link
Member Author

Thanks Yannick!

@original-brownbear original-brownbear merged commit f70e8f6 into elastic:7.x Jan 9, 2020
@original-brownbear original-brownbear deleted the 50692-7.x branch January 9, 2020 20:21
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Jan 10, 2020
We need the same fix we did in `7.x` (elastic#50797) and only get snapshot status
for the current version or older. Otherwise these tests break for
e.g.`7.0.1` due to the same index metadata incompatibility.

Closes elastic#50819
original-brownbear added a commit that referenced this pull request Jan 10, 2020
We need the same fix we did in `7.x` (#50797) and only get snapshot status
for the current version or older. Otherwise these tests break for
e.g.`7.0.1` due to the same index metadata incompatibility.

Closes #50819
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this pull request Jan 23, 2020
We need the same fix we did in `7.x` (elastic#50797) and only get snapshot status
for the current version or older. Otherwise these tests break for
e.g.`7.0.1` due to the same index metadata incompatibility.

Closes elastic#50819
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants