-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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 testSnapshotWithStuckNode #102398
Fix testSnapshotWithStuckNode #102398
Conversation
This test sometimes relies on repository cleanup to remove all but the `index.latest` and `index-N` blobs, but in fact repo cleanup will leave behind the `index-(N-1)` blob too. This commit relaxes the test to account for this, but then strengthens it to assert that the blobs left in the repo are exactly the ones we expect. Closes elastic#101573
Pinging @elastic/es-distributed (Team:Distributed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! I spent a lot of time on this test in the last iteration and couldn't make the assertion work consistently.
// Expect two or three files to remain in the repository: | ||
// (1) index-latest | ||
// (2) index-(N+1) | ||
// (3) index-N (maybe: a fully successful deletion removes this, but cleanup does not, see #100718) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it this one https://github.com/elastic/elasticsearch/pull/101718/files ?
Does not seem related
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, #100718
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed one digit 🤦
This test sometimes relies on repository cleanup to remove all but the
index.latest
andindex-N
blobs, but in fact repo cleanup will leavebehind the
index-(N-1)
blob too. This commit relaxes the test toaccount for this, but then strengthens it to assert that the blobs left
in the repo are exactly the ones we expect.
Closes #101573