Commit 5031016
committed
mmaprototype: fix doneFunc
Previously, we were incorrectly including both voterIndex and nonVoterIndex in satisfiedByReplica for voter constraints's doneFunc, which didn’t seem right. I was initially surprised that nonVoterIndex showed up at all for satisfiedByReplica of voter constraints. It might be accounting for cases where a promotion or demotion might be needed. So satisfiedByReplica[nonVoterIndex] for a voter constraint may legitimately be non-zero.
TODO:
Putting this up for visibility and discussion — I still need to understand the code here better to see whether this fix is right; something feels off. More tests are needed as well.1 parent ef4e9e4 commit 5031016
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
843 | | - | |
| 843 | + | |
844 | 844 | | |
845 | 845 | | |
846 | 846 | | |
| |||
880 | 880 | | |
881 | 881 | | |
882 | 882 | | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
883 | 888 | | |
884 | 889 | | |
885 | 890 | | |
| |||
930 | 935 | | |
931 | 936 | | |
932 | 937 | | |
933 | | - | |
| 938 | + | |
934 | 939 | | |
935 | 940 | | |
936 | 941 | | |
937 | | - | |
| 942 | + | |
938 | 943 | | |
939 | 944 | | |
940 | 945 | | |
| |||
0 commit comments