Commit 7b2f455
Merge #158156
158156: mmaprototype: use voterIndex when selecting a voter to be removed r=wenyihu6 a=wenyihu6
Epic: CRDB-55052
Release note: none
Fixes: #157991
---
**mmaprototype: use voterIndex when selecting a voter to be removed**
Previously, we were incorrectly using nonVoterIndex when selecting a voter to
remove in over-satisfied scenarios. While attempting to write tests, it appears
that this code is actually unreachable under normal flow: for it to trigger,
both replica constraints and voter constraints would need to be empty, but
makeNormalizedSpanConfig ensures voter constraints is non-empty when all replica
constraint is empty. Things remain to be figured out, but this change does not
harm.
Co-authored-by: wenyihu6 <[email protected]>File tree
1 file changed
+2
-2
lines changed- pkg/kv/kvserver/allocator/mmaprototype
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
| 350 | + | |
351 | 351 | | |
352 | | - | |
| 352 | + | |
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| |||
0 commit comments