Commit 036265b
[serve] Gate rank-consistency check on replica membership changes
The rank-consistency pass is O(N) with heavy constants and used to run on every
control-loop tick; at 10K+ replicas it monopolizes the controller loop. Rank
consistency can only be violated by a membership change, so gate the pass on the
active replica-id set and skip it while that set is unchanged. Two O(1) guards run
first -- status must be HEALTHY and there must be no STARTING replicas -- which rule
out the busiest ticks before paying for the replica-list copy.
Rank failures are invariant violations rather than expected conditions, so the gate
carries no machinery for them: a pass that runs caches its membership, and nothing
special happens if the underlying rank op logged and returned a safe default.
The gate's tests inject a counting rank manager at the same seam the fixture already
uses for actor wrappers, so the rank logic under test stays real and only the call
count is added.
Signed-off-by: john.taylor <john.taylor@anyscale.com>
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 89751b6 commit 036265b
2 files changed
Lines changed: 139 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2934 | 2934 | | |
2935 | 2935 | | |
2936 | 2936 | | |
| 2937 | + | |
2937 | 2938 | | |
2938 | 2939 | | |
2939 | 2940 | | |
| |||
4972 | 4973 | | |
4973 | 4974 | | |
4974 | 4975 | | |
4975 | | - | |
| 4976 | + | |
| 4977 | + | |
| 4978 | + | |
| 4979 | + | |
| 4980 | + | |
| 4981 | + | |
| 4982 | + | |
| 4983 | + | |
| 4984 | + | |
| 4985 | + | |
| 4986 | + | |
| 4987 | + | |
4976 | 4988 | | |
4977 | | - | |
4978 | | - | |
| 4989 | + | |
4979 | 4990 | | |
4980 | 4991 | | |
4981 | 4992 | | |
4982 | 4993 | | |
4983 | | - | |
| 4994 | + | |
4984 | 4995 | | |
4985 | | - | |
4986 | | - | |
4987 | | - | |
4988 | | - | |
| 4996 | + | |
| 4997 | + | |
| 4998 | + | |
| 4999 | + | |
| 5000 | + | |
| 5001 | + | |
| 5002 | + | |
| 5003 | + | |
| 5004 | + | |
| 5005 | + | |
4989 | 5006 | | |
4990 | | - | |
4991 | | - | |
4992 | | - | |
| 5007 | + | |
| 5008 | + | |
| 5009 | + | |
| 5010 | + | |
4993 | 5011 | | |
4994 | 5012 | | |
4995 | 5013 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10585 | 10585 | | |
10586 | 10586 | | |
10587 | 10587 | | |
| 10588 | + | |
| 10589 | + | |
| 10590 | + | |
| 10591 | + | |
| 10592 | + | |
| 10593 | + | |
| 10594 | + | |
| 10595 | + | |
| 10596 | + | |
| 10597 | + | |
| 10598 | + | |
| 10599 | + | |
| 10600 | + | |
| 10601 | + | |
| 10602 | + | |
| 10603 | + | |
| 10604 | + | |
| 10605 | + | |
| 10606 | + | |
| 10607 | + | |
| 10608 | + | |
| 10609 | + | |
| 10610 | + | |
| 10611 | + | |
| 10612 | + | |
| 10613 | + | |
| 10614 | + | |
| 10615 | + | |
| 10616 | + | |
| 10617 | + | |
| 10618 | + | |
| 10619 | + | |
| 10620 | + | |
| 10621 | + | |
| 10622 | + | |
| 10623 | + | |
| 10624 | + | |
| 10625 | + | |
| 10626 | + | |
| 10627 | + | |
| 10628 | + | |
| 10629 | + | |
| 10630 | + | |
| 10631 | + | |
| 10632 | + | |
| 10633 | + | |
| 10634 | + | |
| 10635 | + | |
| 10636 | + | |
| 10637 | + | |
| 10638 | + | |
| 10639 | + | |
| 10640 | + | |
| 10641 | + | |
| 10642 | + | |
| 10643 | + | |
| 10644 | + | |
| 10645 | + | |
| 10646 | + | |
| 10647 | + | |
| 10648 | + | |
| 10649 | + | |
| 10650 | + | |
| 10651 | + | |
| 10652 | + | |
| 10653 | + | |
| 10654 | + | |
| 10655 | + | |
| 10656 | + | |
| 10657 | + | |
| 10658 | + | |
| 10659 | + | |
| 10660 | + | |
| 10661 | + | |
| 10662 | + | |
| 10663 | + | |
| 10664 | + | |
| 10665 | + | |
| 10666 | + | |
| 10667 | + | |
| 10668 | + | |
| 10669 | + | |
| 10670 | + | |
| 10671 | + | |
| 10672 | + | |
| 10673 | + | |
| 10674 | + | |
| 10675 | + | |
| 10676 | + | |
| 10677 | + | |
| 10678 | + | |
| 10679 | + | |
| 10680 | + | |
| 10681 | + | |
| 10682 | + | |
| 10683 | + | |
| 10684 | + | |
| 10685 | + | |
| 10686 | + | |
| 10687 | + | |
| 10688 | + | |
| 10689 | + | |
| 10690 | + | |
| 10691 | + | |
| 10692 | + | |
| 10693 | + | |
| 10694 | + | |
| 10695 | + | |
| 10696 | + | |
| 10697 | + | |
10588 | 10698 | | |
10589 | 10699 | | |
0 commit comments