Browse Source
fix isMisplaced() in command_volume_fix_replication.go (#4988)
pull/4990/head
zehweh
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
3 deletions
-
weed/shell/command_volume_fix_replication.go
|
|
@ -572,12 +572,12 @@ func isMisplaced(replicas []*VolumeReplica, replicaPlacement *super_block.Replic |
|
|
|
|
|
|
|
for i := 0; i < len(replicas); i++ { |
|
|
|
others := otherThan(replicas, i) |
|
|
|
if satisfyReplicaPlacement(replicaPlacement, others, *replicas[i].location) { |
|
|
|
return false |
|
|
|
if !satisfyReplicaPlacement(replicaPlacement, others, *replicas[i].location) { |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return true |
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|