-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Snapshot _status API to return correct status for partial snapshots #12812
Snapshot _status API to return correct status for partial snapshots #12812
Conversation
Signed-off-by: aggarwalShivani <[email protected]>
❌ Gradle check result for d1e6656: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
@reta okay thanks, I'll have to dig deeper to understand that :) But do you think we should not backport it to 2.x? |
@aggarwalShivani the answer depends on if cluster in mixed cluster is correctly handled |
Hi @reta , I have repeated this test on 2.x branch too - where 2 nodes were on v2.14.0-SNAPSHOT and 2 were on v2.13.0 - there too the results were same. Additionally, since we are backporting it to 2.14, I think we can change the version condition right away as suggested by @owaiskazi19,
The same PR could be backported to 2.x branch as-is. Please let me know if this understanding is right. |
As @reta mentioned since we are backporting this to 2.x, we can change the version in the backport PR. For main we can keep it as 3.0. @reta looks good to merge? |
Yeah, I approved, thanks @owaiskazi19 ! |
Signed-off-by: aggarwalShivani <[email protected]>
Oh okay sure. Thanks :) Although my understanding was slightly different. Please correct me where i went wrong.
|
@peternied any idea about the failure in detect breaking change GHA? |
The failure is from a change in how snapshots are resolved with the Lucene version bump [1], another merge from main will resolve this. I was able to validate the failure on my local machine and confirm it was resolved with a merge from main. @aggarwalShivani Could you fetch and merge from main to be sure that 39ac2df is included? |
We could do that right after backporting your code to 2.x, otherwise mixed cluster tests will fail since 2.14.0 (2.x) does not know what to do with PARTIAL |
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.
LGTM! @aggarwalShivani thanks for being patient with the review. I have removed the auto backport 2.x label. Can you raise a manual backport PR to 2.x branch with Version.V_2_14_0
change as discussed here?
Thanks @owaiskazi19 for your review and suggestions. Sure, I will raise another PR on 2.x branch with these changes. However, I see the changelog-verifier check is now failing with this error -
I'm assuming this is due to removing the auto backport 2.x label. How do we proceed with the merge then? |
Yes, that's correct. I'll go ahead and merge this. You can raise a manual 2.x PR after that |
…ial snapshots (#12812) (#13260) * Snapshot _status API to return correct status for partial snapshots Signed-off-by: aggarwalShivani <[email protected]> * Updated CHANGELOG.md Signed-off-by: aggarwalShivani <[email protected]> --------- Signed-off-by: aggarwalShivani <[email protected]>
Description
Issue: The /_snapshot/repo/snapshot/_status API endpoint returns snapshot.state=SUCCESS for snapshots that have failed shards and are actually in PARTIAL status.
Change - To fix this behaviour, a new PARTIAL state is added in SnapshotsInProgress.State enum.
Also, currently, for both successful and partial snapshots, success state was being returned as the response. This is now changed to return PARTIAL for snapshots in partial status.
Test case is also added, to test for partial snapshots.
Related Issues
Resolves #7952
Check List
[ ] New functionality has been documented.[ ] New functionality has javadoc added[ ] Public documentation issue/PR createdBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.