Repository navigation
Raft Cluster: reconnect replicas when the primary address changes - #5733
bandalgomsu wants to merge 3 commits into
Conversation
A primary can restart with the same node ID and new ports. Raft updates the node address while the replica keeps trying the old port. Schedule a replication update when HELLO or NODE_INFO changes the current primary address. Test each path and verify that the replica reports the new port and brings the link back up. Signed-off-by: Su Ko <rhtn1128@gmail.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Review stateReady for human review. Risk: Medium. A wrong retarget would drop a healthy replication link on a Raft-cluster replica or point it at a stale address, and a live port change now aborts a manual failover in progress. Open findings: none. Resolved (1)
Backport: Not needed. src/cluster_raft.c exists only on the cluster-v2 branch (absent on upstream/9.2), so no release line carries this code. Updated for a571d46 at 2026-12-05 10:12 UTC. The bot rewrites this comment on every review. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## cluster-v2 #5733 +/- ##
==============================================
+ Coverage 81.62% 81.66% +0.04%
==============================================
Files 203 203
Lines 108488 108514 +26
==============================================
+ Hits 88553 88620 +67
+ Misses 19935 19894 -41
🚀 New features to boost your workflow:
|
Defer replication retargeting while the event loop is blocked and prefer committed addresses over HELLO. Cancel coordinated failover before reconnecting so a previously acknowledged write pause cannot be reused. Signed-off-by: Su Ko <rhtn1128@gmail.com>
|
thanks for the review! fixed all three in |
Signed-off-by: Su Ko <rhtn1128@gmail.com>
When a Raft primary restarts with the same node ID on new ports, the cluster can report
okand show the new address inCLUSTER NODESwhile the replica keeps trying the old port. Reconnect the replica when it learns a new replication address for its current primary.Tests
NODE_INFOcan commit.NODE_INFOpropagates a live port change../runtest --single unit/cluster/cluster-raftpassed.