Fix stranded snapshot markers on publish failure - #22518
Conversation
PR Reviewer Guide 🔍(Review updated until commit c3a19e9)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to c3a19e9 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit de51453
Suggestions up to commit 4cc3b75
Suggestions up to commit 70de2e4
Suggestions up to commit 503a6b3
Suggestions up to commit 5987e9d |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #22518 +/- ##
============================================
- Coverage 71.42% 71.40% -0.03%
Complexity 76786 76786
============================================
Files 6148 6148
Lines 357980 358031 +51
Branches 52177 52183 +6
============================================
- Hits 255689 255638 -51
- Misses 81937 82094 +157
+ Partials 20354 20299 -55 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
shourya035
left a comment
There was a problem hiding this comment.
Please add some integration tests to ensure that the feature works end to end with induced cluster manager failures
99f35b1 to
1cb6abd
Compare
|
Persistent review updated to latest commit 1cb6abd |
|
❌ Gradle check result for 1cb6abd: 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? |
1cb6abd to
a9a5f13
Compare
|
Persistent review updated to latest commit a9a5f13 |
a9a5f13 to
104557c
Compare
|
Persistent review updated to latest commit 104557c |
104557c to
a0f69b9
Compare
|
Persistent review updated to latest commit a0f69b9 |
a0f69b9 to
5577c6f
Compare
|
Persistent review updated to latest commit 5577c6f |
|
❌ Gradle check result for 5577c6f: 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? |
|
Please address the resolved comments. Looks like the comments were marked resolved but the code changes were not made |
|
❌ Gradle check result for b0edc93: null 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? |
b0edc93 to
328edbe
Compare
|
Persistent review updated to latest commit 328edbe |
328edbe to
74f33fb
Compare
|
Persistent review updated to latest commit 74f33fb |
|
❌ Gradle check result for 74f33fb: 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? |
6154509 to
91090a9
Compare
|
Persistent review updated to latest commit 91090a9 |
|
❌ Gradle check result for 91090a9: 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? |
91090a9 to
5987e9d
Compare
|
Persistent review updated to latest commit 5987e9d |
|
❌ Gradle check result for 5987e9d: 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? |
5987e9d to
503a6b3
Compare
|
Persistent review updated to latest commit 503a6b3 |
503a6b3 to
70de2e4
Compare
|
Persistent review updated to latest commit 70de2e4 |
Signed-off-by: Sukriti Sinha <sukriiti@amazon.com>
70de2e4 to
4cc3b75
Compare
|
Persistent review updated to latest commit 4cc3b75 |
|
❌ Gradle check result for 4cc3b75: 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? |
4cc3b75 to
de51453
Compare
|
Persistent review updated to latest commit de51453 |
|
❌ Gradle check result for de51453: 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? |
Signed-off-by: Sukriti Sinha <sukriiti@amazon.com>
de51453 to
c3a19e9
Compare
|
Persistent review updated to latest commit c3a19e9 |
Description
Adds
retryOrFailOnClusterManagerFailOverhelper that retries a failed cluster-state publish (marker removal) with bounded exponential backoff (1s/2s/4s, max 3 retries) when the node is still the elected cluster-manager. Without this, a publish failure on a stable cluster-manager strands the in-progress snapshot marker forever, blocking index deletion and close.Also fixes a latent stale-read bug in
stateWithoutSnapshotV2: the innerexecute()was reading from the captured outerstateparameter instead of the livecurrentState, which could clobber concurrentcluster-state changes. The method is refactored into a task factory (
createStateWithoutSnapshotV2Task) that makes this bug structurally impossible to reintroduce.The retry behavior is gated behind the
SNAPSHOT_RESILIENCEfeature flag (default off). The stale-read fix is unconditional.Depends on #22516 (PR-C). Will rebase once that merges.
Testing
RetryOrFailOnClusterManagerFailOverTests: 10 unit tests covering helper decision logic, stale-state bug fix, and retried-task behavior.-Dtests.iters=20for seed stability.Check List
By 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.