Repository navigation
Commit 2525876
committed
clusterer_controller: announce a join to the whole cluster, not just the joiner
A node that restarts resumes its sequence counters at zero. Its peers
still hold the replay window from the previous incarnation, so every
packet it sends is 'older than the replay window' and is dropped -
silently, because the consumer-plane drop is LM_DBG and production runs
at INFO. cl_ctr_handle_member_list() already resets those windows on
receipt; the master simply never told anyone. On JOIN_REQ it sent
NODE_ASSIGN + KEY_GRANT + a UNICAST MEMBER_LIST to the joiner alone, so
only the master itself recovered - it re-creates the peer entry while
handling the join, which is why the failure presents as 'only the master
can hear the restarted node'.
Measured in production: a billing gateway was restarted at 02:07:59; the
master logged one '(unicast)' MEMBER_LIST and nothing else all day; the
third node accepted ZERO packets from it over the following ten hours
(cachedb_perf per-peer replies_from_it=0, last_reply_ago=36154) while
happily serving it 106k answers of its own. Its cross-node cache pulls
then waited the full 50 ms timeout on every miss - ~8.5/s - which is the
20-25% per-process 'load' the operator saw and reported as high CPU.
The master now announces the join to the whole group. The announcement
is the existing full-state broadcast (NODE_ASSIGNs + MEMBER_LIST), so
receivers need no change; it is coalesced per CL_CTR_RESYNC_MIN_US like
RESYNC, but an announcement suppressed by that window is remembered and
emitted by the next keepalive tick instead of dropped - coalescing away
a second node's join would reproduce the bug for that node.
Note the departure signal cannot be relied on to prevent this: a
graceful stop sends GOODBYE, and peers then drop the entry and re-create
it clean on return - but production recorded no GOODBYE at all from the
restarted node (zero lines on both peers), and a crash or a lost packet
never sends one.
Fail-first rig (three nodes, cluster 777, /dn/run_join2.sh): pump 1400
cluster messages so the sender's sequence passes the 1024-wide window,
SIGKILL the node so no GOODBYE is emitted, restart, send 25 more.
Unpatched master: the other backup delivered 0 of 25. Patched master:
25 of 25, with 3 'joined - broadcasting full state' announcements. Only
the master's binary differs between the arms.1 parent 600d40d commit 2525876
1 file changed
Lines changed: 75 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
747 | 755 | | |
748 | 756 | | |
749 | 757 | | |
| |||
1438 | 1446 | | |
1439 | 1447 | | |
1440 | 1448 | | |
| 1449 | + | |
1441 | 1450 | | |
1442 | 1451 | | |
1443 | 1452 | | |
| |||
4100 | 4109 | | |
4101 | 4110 | | |
4102 | 4111 | | |
| 4112 | + | |
| 4113 | + | |
| 4114 | + | |
| 4115 | + | |
| 4116 | + | |
| 4117 | + | |
| 4118 | + | |
| 4119 | + | |
| 4120 | + | |
| 4121 | + | |
| 4122 | + | |
| 4123 | + | |
| 4124 | + | |
| 4125 | + | |
| 4126 | + | |
| 4127 | + | |
| 4128 | + | |
| 4129 | + | |
| 4130 | + | |
| 4131 | + | |
| 4132 | + | |
| 4133 | + | |
| 4134 | + | |
| 4135 | + | |
| 4136 | + | |
| 4137 | + | |
| 4138 | + | |
| 4139 | + | |
| 4140 | + | |
| 4141 | + | |
| 4142 | + | |
| 4143 | + | |
| 4144 | + | |
| 4145 | + | |
| 4146 | + | |
| 4147 | + | |
| 4148 | + | |
4103 | 4149 | | |
4104 | 4150 | | |
4105 | | - | |
4106 | | - | |
| 4151 | + | |
| 4152 | + | |
4107 | 4153 | | |
4108 | 4154 | | |
4109 | 4155 | | |
4110 | 4156 | | |
4111 | 4157 | | |
4112 | 4158 | | |
4113 | 4159 | | |
4114 | | - | |
4115 | | - | |
4116 | | - | |
4117 | | - | |
4118 | | - | |
4119 | | - | |
4120 | | - | |
4121 | | - | |
4122 | | - | |
4123 | | - | |
| 4160 | + | |
| 4161 | + | |
4124 | 4162 | | |
4125 | 4163 | | |
4126 | 4164 | | |
| |||
4968 | 5006 | | |
4969 | 5007 | | |
4970 | 5008 | | |
| 5009 | + | |
| 5010 | + | |
| 5011 | + | |
| 5012 | + | |
| 5013 | + | |
| 5014 | + | |
| 5015 | + | |
| 5016 | + | |
| 5017 | + | |
| 5018 | + | |
| 5019 | + | |
| 5020 | + | |
| 5021 | + | |
| 5022 | + | |
| 5023 | + | |
4971 | 5024 | | |
4972 | 5025 | | |
4973 | 5026 | | |
| |||
6949 | 7002 | | |
6950 | 7003 | | |
6951 | 7004 | | |
| 7005 | + | |
| 7006 | + | |
| 7007 | + | |
| 7008 | + | |
| 7009 | + | |
| 7010 | + | |
| 7011 | + | |
| 7012 | + | |
| 7013 | + | |
| 7014 | + | |
6952 | 7015 | | |
6953 | 7016 | | |
6954 | 7017 | | |
| |||
0 commit comments