Skip to content

Commit

Permalink
kvserver: teach replicateQueue to replace dead/decommisioning non-voters
Browse files Browse the repository at this point in the history
The commit is very similar to cockroachdb#59403.

Previously, non-voters on dead or decommissioning nodes would not get
removed or replaced. This commit fixes this behavior.

Release justification: fixes limitation where dead/decommissioning
non-voters would not be removed or replaced
Release note: None
  • Loading branch information
aayushshah15 committed Mar 13, 2021
1 parent c0177de commit f514c3e
Show file tree
Hide file tree
Showing 5 changed files with 465 additions and 74 deletions.
4 changes: 2 additions & 2 deletions pkg/kv/kvserver/allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,8 @@ func (a *Allocator) computeAction(
// The range is over-replicated _and_ has non-voter(s) on a dead node. We'll
// just remove these.
action = AllocatorRemoveDeadNonVoter
log.VEventf(ctx, 3, "%s - dead=%d, live=%d, quorum=%d, priority=%.2f",
action, len(deadNonVoters), len(liveNonVoters), quorum, action.Priority())
log.VEventf(ctx, 3, "%s - dead=%d, live=%d, priority=%.2f",
action, len(deadNonVoters), len(liveNonVoters), action.Priority())
return action, action.Priority()
}

Expand Down
Loading

0 comments on commit f514c3e

Please sign in to comment.