Commit 95f8260
committed
feat(swim): implement gossip dissemination with piggyback propagation
Introduce the dissemination module (DisseminationQueue, PendingUpdate,
apply_and_disseminate) that carries membership deltas as piggyback
payloads on every outgoing probe datagram.
Each outgoing Ping, PingReq, and Ack now attaches up to max_piggyback
rumours selected from the queue. A rumour is retired after it has been
forwarded ceil(lambda * log2(n+1)) times, matching the bound from the
SWIM:GREED paper (Das et al. §4.3) that guarantees with high probability
every live member receives each delta.
Inbound piggyback is ingested before dispatching the message so that a
self-refutation incarnation bump is reflected in the outgoing Ack of the
same round-trip. SwimConfig gains max_piggyback and fanout_lambda fields
with validation; ProbeRound and DetectorRunner are wired to pass them
through. Integration tests cover cross-node delta propagation and
self-refutation via piggyback.1 parent 2b4a27c commit 95f8260
9 files changed
Lines changed: 743 additions & 15 deletions
File tree
- nodedb-cluster/src/swim
- detector
- dissemination
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
42 | 53 | | |
43 | 54 | | |
44 | 55 | | |
| |||
51 | 62 | | |
52 | 63 | | |
53 | 64 | | |
| 65 | + | |
| 66 | + | |
54 | 67 | | |
55 | 68 | | |
56 | 69 | | |
| |||
88 | 101 | | |
89 | 102 | | |
90 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
91 | 116 | | |
92 | 117 | | |
93 | 118 | | |
| |||
171 | 196 | | |
172 | 197 | | |
173 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
174 | 225 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| 102 | + | |
101 | 103 | | |
102 | 104 | | |
| 105 | + | |
| 106 | + | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
| |||
113 | 117 | | |
114 | 118 | | |
115 | 119 | | |
| 120 | + | |
116 | 121 | | |
117 | 122 | | |
| 123 | + | |
| 124 | + | |
118 | 125 | | |
119 | 126 | | |
120 | 127 | | |
121 | 128 | | |
| 129 | + | |
| 130 | + | |
122 | 131 | | |
123 | 132 | | |
124 | 133 | | |
| |||
134 | 143 | | |
135 | 144 | | |
136 | 145 | | |
137 | | - | |
| 146 | + | |
138 | 147 | | |
139 | 148 | | |
140 | 149 | | |
| |||
170 | 179 | | |
171 | 180 | | |
172 | 181 | | |
173 | | - | |
| 182 | + | |
174 | 183 | | |
175 | 184 | | |
176 | 185 | | |
| |||
251 | 260 | | |
252 | 261 | | |
253 | 262 | | |
| 263 | + | |
| 264 | + | |
254 | 265 | | |
255 | 266 | | |
256 | 267 | | |
| |||
287 | 298 | | |
288 | 299 | | |
289 | 300 | | |
| 301 | + | |
290 | 302 | | |
291 | 303 | | |
292 | 304 | | |
293 | 305 | | |
294 | 306 | | |
| 307 | + | |
295 | 308 | | |
296 | 309 | | |
| 310 | + | |
| 311 | + | |
297 | 312 | | |
298 | 313 | | |
299 | 314 | | |
| |||
314 | 329 | | |
315 | 330 | | |
316 | 331 | | |
| 332 | + | |
317 | 333 | | |
318 | 334 | | |
319 | 335 | | |
320 | 336 | | |
321 | 337 | | |
| 338 | + | |
322 | 339 | | |
323 | 340 | | |
| 341 | + | |
| 342 | + | |
324 | 343 | | |
325 | 344 | | |
326 | 345 | | |
| |||
367 | 386 | | |
368 | 387 | | |
369 | 388 | | |
| 389 | + | |
370 | 390 | | |
371 | 391 | | |
372 | 392 | | |
373 | 393 | | |
374 | 394 | | |
| 395 | + | |
375 | 396 | | |
376 | 397 | | |
| 398 | + | |
| 399 | + | |
377 | 400 | | |
378 | 401 | | |
379 | 402 | | |
| |||
436 | 459 | | |
437 | 460 | | |
438 | 461 | | |
| 462 | + | |
439 | 463 | | |
440 | 464 | | |
441 | 465 | | |
442 | 466 | | |
443 | 467 | | |
| 468 | + | |
444 | 469 | | |
445 | 470 | | |
| 471 | + | |
| 472 | + | |
446 | 473 | | |
447 | 474 | | |
448 | 475 | | |
| |||
468 | 495 | | |
469 | 496 | | |
470 | 497 | | |
471 | | - | |
472 | 498 | | |
0 commit comments