Open
Conversation
cluster_shard.go(Failover failed because of sequence is 0 apache#366)
- Added quorum verification in probeNode() to prevent false-positive failovers. - Added explicit node fencing in promoteNewMaster() to demote old master before promotion. - Updated UpdateCluster() to enforce leader lease validation (blocks zombie controllers). - Wrapped promotion and persistence in atomic flow with rollback/logging. - Added split_brain_test.go to verify Zombie Controller, quorum, and node fencing scenarios.
Author
|
This PR fully resolves Issue #329: Split-Brain Vulnerability in kvrocks-controller. Key Fixes:
Verification:
Closes #329 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements comprehensive safeguards against the split-brain scenario in kvrocks-controller as described in Issue #329.
Key Fixes:
probeNode()now performs quorum verification to prevent false-positive failovers.promoteNewMaster()explicitly demotes the old master before promoting a new one.UpdateCluster()validates the controller’s leader lease to block Zombie Controllers.Verification:
split_brain_test.go) confirm Zombie Controllers are blocked and quorum checks work.All critical safety invariants are enforced, preventing both control-plane and data-plane split-brain scenarios.