Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: Fix simulation of rebalance removals to actually remove targets
If the first target attempted was rejected due to the simulation claiming that it would be immediately removed, we would reuse the modified `rangeInfo.Desc.Replicas` that had the target added to it, messing with future iterations of the loop. Also, we weren't properly modifying the `candidates` slice, meaning that we could end up trying the same replica multiple times. I have a test for this, but it doesn't pass yet because the code in #18364 actually isn't quite sufficient for fixing cases like #20241. I'll send that out tomorrow once I have a fix done. Release note: None
- Loading branch information