-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Update last seen cluster state in commit phase #16215
Update last seen cluster state in commit phase #16215
Conversation
8798069
to
3a1e37f
Compare
❌ Gradle check result for 3a1e37f: 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? |
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.
The only concern I see is the additional download overhead(remote store calls) on the follower nodes
I think the long term fix should be to update the lastSeen cluster state in commit phase with the committed config. |
3a1e37f
to
3826aa7
Compare
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.
Overall LGTM, I am assuming last seen that we are setting is at the end of the publication and no failure can revert this last seen for the given term and version
Yes last seen is being set at the end of publication (last step in the commit phase). |
3826aa7
to
8ffcaed
Compare
❕ Gradle check result for 8ffcaed: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16215 +/- ##
=========================================
Coverage 72.03% 72.03%
- Complexity 64782 64818 +36
=========================================
Files 5307 5307
Lines 302545 302548 +3
Branches 43703 43703
=========================================
+ Hits 217925 217940 +15
- Misses 66712 66745 +33
+ Partials 17908 17863 -45 ☔ View full report in Codecov by Sentry. |
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 but needs a CHANGELOG entry
Signed-off-by: Sooraj Sinha <[email protected]>
Signed-off-by: Sooraj Sinha <[email protected]>
8ffcaed
to
86d2ee2
Compare
Added CHANGELOG |
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-16215-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a53e0c63aa9c6a85fed30e7bdce8b533aa471060
# Push it to GitHub
git push --set-upstream origin backport/backport-16215-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x Then, create a pull request where the |
) * Update last seen cluster state on apply commit Signed-off-by: Sooraj Sinha <[email protected]>
Signed-off-by: Sooraj Sinha <[email protected]>
) * Update last seen cluster state on apply commit Signed-off-by: Sooraj Sinha <[email protected]>
) * Update last seen cluster state on apply commit Signed-off-by: Sooraj Sinha <[email protected]>
) * Update last seen cluster state on apply commit Signed-off-by: Sooraj Sinha <[email protected]>
Description
Coordination metadata contains accepted voting configuration and committed voting configuration.
When the voting configuration changes, the changed accepted voting configuration is sent in publish phase. The follower nodes apply this publish phase cluster state on the
lastSeen
cluster state in PublicationTransportHandler. In the commit phase, each node set the committed voting configuration using the accepted voting configuration by themselves.When the next cluster state is published, it does not contain any diff in the voting configuration. This next cluster state update uses
lastSeen
again to apply the diff due to which the committed voting configuration is still set to an older value.With local cluster state publication, this issue does not occur as the entire coordination metadata is sent in every diff.
With remote cluster state publication, we can mitigate this in the same way by always sending coordination metadata in the diff. But this has the overhead of downloading the coordination metadata everytime on each data node.
So the alternative approach is to update the
lastSeen
cluster state in the commite phaseRelated Issues
NA
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.