Commit 489ee8b
committed
Use tick-related timeout to repair leader record
A quorum queue tries to repair its record in a tick handler. This can
happen during a network partition and the metadata store may itself be
unavailable, making the update likely to time out.
The default metadata store timeout is usually higher than the tick
interval, so the tick handler may be stuck during several ticks. The
record takes some time to be updated (timeout + tick interval, 30 + 5
seconds by default), significantly longer than it takes the metadata
store to trigger an election and recover.
Client applications may rely on the quorum queue topology to connect to
an appropriate node, so making the system reflect the actual topology
faster is important to them.
This commit makes the record update operations use a timeout 1-second
lower than the tick interval. The tick handler process should finish
earlier in case of metadata datastore unavailability and it should not
take more than a couple of ticks once the datastore is available to
update the record.1 parent 6261a7d commit 489ee8b
File tree
3 files changed
+38
-9
lines changed- deps/rabbit/src
3 files changed
+38
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
307 | 314 | | |
308 | 315 | | |
309 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
637 | 638 | | |
638 | 639 | | |
639 | 640 | | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
640 | 655 | | |
641 | 656 | | |
642 | | - | |
| 657 | + | |
643 | 658 | | |
644 | 659 | | |
645 | 660 | | |
| |||
648 | 663 | | |
649 | 664 | | |
650 | 665 | | |
| 666 | + | |
651 | 667 | | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
652 | 671 | | |
653 | | - | |
| 672 | + | |
654 | 673 | | |
655 | 674 | | |
656 | 675 | | |
657 | 676 | | |
658 | 677 | | |
659 | | - | |
| 678 | + | |
660 | 679 | | |
661 | 680 | | |
662 | 681 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
| 449 | + | |
| 450 | + | |
450 | 451 | | |
451 | 452 | | |
452 | 453 | | |
| |||
656 | 657 | | |
657 | 658 | | |
658 | 659 | | |
659 | | - | |
| 660 | + | |
660 | 661 | | |
661 | 662 | | |
662 | 663 | | |
| |||
1981 | 1982 | | |
1982 | 1983 | | |
1983 | 1984 | | |
1984 | | - | |
1985 | | - | |
| 1985 | + | |
1986 | 1986 | | |
1987 | 1987 | | |
1988 | 1988 | | |
| |||
2408 | 2408 | | |
2409 | 2409 | | |
2410 | 2410 | | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
0 commit comments