Commit d31b9aa
committed
QQ: resend pending commands when new leader detected on applied notification.
When a leader changes all enqueuer and consumer processes are notified
from the `state_enter(leader,` callback. However a new leader may not
yet have applied all commands that the old leader had. If any of those
commands is a checkout or a register_enqueuer command these processes
will not be notified of the new leader and thus may never resend their
pending commands.
The new leader will however send an applied notification when it does
apply these entries and these are always sent from the leader process
so can also be used to trigger pending resends. This commit implements
that.1 parent a51d8a5 commit d31b9aa
File tree
2 files changed
+96
-11
lines changed- deps/rabbit
- src
- test
2 files changed
+96
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
589 | | - | |
590 | | - | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
591 | 592 | | |
592 | 593 | | |
593 | | - | |
| 594 | + | |
594 | 595 | | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
595 | 619 | | |
596 | 620 | | |
597 | 621 | | |
598 | 622 | | |
599 | 623 | | |
600 | | - | |
| 624 | + | |
601 | 625 | | |
602 | 626 | | |
603 | 627 | | |
604 | 628 | | |
605 | 629 | | |
606 | 630 | | |
607 | | - | |
608 | | - | |
| 631 | + | |
| 632 | + | |
609 | 633 | | |
610 | 634 | | |
611 | 635 | | |
612 | 636 | | |
613 | 637 | | |
614 | 638 | | |
615 | 639 | | |
616 | | - | |
| 640 | + | |
617 | 641 | | |
618 | 642 | | |
619 | 643 | | |
| |||
622 | 646 | | |
623 | 647 | | |
624 | 648 | | |
625 | | - | |
626 | | - | |
| 649 | + | |
| 650 | + | |
627 | 651 | | |
628 | 652 | | |
629 | 653 | | |
630 | 654 | | |
631 | | - | |
| 655 | + | |
632 | 656 | | |
633 | 657 | | |
634 | | - | |
| 658 | + | |
635 | 659 | | |
636 | 660 | | |
637 | 661 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| 64 | + | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| |||
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 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 | + | |
| 225 | + | |
165 | 226 | | |
166 | 227 | | |
167 | 228 | | |
| |||
0 commit comments