Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
106202: allocator: promote non-voter in 1-voter rebalance r=erikgrinaker a=kvoli When there is only 1 voter and 1 non-voter, it was not possible to rebalance the voter replica onto the store which had the non-voter. When attempting to rebalance with only 1 voter, we fall back to adding the new replica first. Adding this new replica fails if the store already has a non-voting replica. This patch updates the 1 voter case in `ReplicationChangesForRebalance` to also consider whether the add target store already has a non-voting replica. If a non-voting replica is found, a promotion is now issued rather than just adding the voter. Fixes: cockroachdb#104066 Epic: none Release note: None Co-authored-by: Austen McClernon <[email protected]>
- Loading branch information