File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
pkg/kv/kvserver/allocator/mmaprototype Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -479,10 +479,16 @@ func doStructuralNormalization(conf *normalizedSpanConfig) error {
479479 var rels []relationshipVoterAndAll
480480 for i := range conf .voterConstraints {
481481 if len (conf .voterConstraints [i ].constraints ) == 0 {
482+ if emptyVoterConstraintIndex != - 1 {
483+ return errors .Errorf ("invalid configurations with empty voter constraint" )
484+ }
482485 emptyVoterConstraintIndex = i
483486 }
484487 for j := range conf .constraints {
485488 if len (conf .constraints [j ].constraints ) == 0 {
489+ if emptyConstraintIndex != - 1 && emptyConstraintIndex != j {
490+ return errors .Errorf ("invalid configurations with empty constraint" )
491+ }
486492 emptyConstraintIndex = j
487493 }
488494 rels = append (rels , relationshipVoterAndAll {
You can’t perform that action at this time.
0 commit comments