File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed
pkg/kv/kvserver/allocator/mmaprototype Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -605,7 +605,7 @@ func doStructuralNormalization(conf *normalizedSpanConfig) error {
605605 // has some remainingReplicas, we take them here to satisfy the empty voter
606606 // constraint as much as possible. Only what is remaining in the empty voter
607607 // constraint will then be available for subsequent narrowing.
608- if emptyVoterConstraintIndex > 0 && emptyConstraintIndex > 0 {
608+ if emptyVoterConstraintIndex >= 0 && emptyConstraintIndex >= 0 {
609609 neededReplicas := conf .voterConstraints [emptyVoterConstraintIndex ].numReplicas
610610 if voterConstraints [emptyVoterConstraintIndex ].numReplicas != 0 {
611611 panic ("programming error" )
Original file line number Diff line number Diff line change @@ -609,8 +609,6 @@ output:
609609
610610# Replicas are not constrained. The voter constraints are promoted to replica
611611# constraints.
612- #
613- # TODO(sumeer): investigate why the normalization also threw an error.
614612normalize num-replicas=5 num-voters=3
615613constraint num-replicas=5
616614voter-constraint num-replicas=1 +region=a +zone=a1
@@ -623,7 +621,6 @@ input:
623621 voter-constraints:
624622 +region=a,+zone=a1:1
625623 +region=a,+zone=a2:1
626- err=could not satisfy all voter constraints due to non-intersecting conjunctions in voter and all replica constraints
627624output:
628625 num-replicas=5 num-voters=3
629626 constraints:
You can’t perform that action at this time.
0 commit comments