diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-09-09 11:21:23 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-09-09 11:21:23 -0700 |
| commit | 387ab6796f274151f802ccdab8756b959b5fb1cb (patch) | |
| tree | a3b95f5bdba66f12c609b5e53b262b011a47a450 /weed/shell/command_volume_fix_replication.go | |
| parent | 4fc0bd1a8173e284ff919edb5214f5adf7a90f06 (diff) | |
| download | seaweedfs-387ab6796f274151f802ccdab8756b959b5fb1cb.tar.xz seaweedfs-387ab6796f274151f802ccdab8756b959b5fb1cb.zip | |
filer: cross cluster synchronization
Diffstat (limited to 'weed/shell/command_volume_fix_replication.go')
| -rw-r--r-- | weed/shell/command_volume_fix_replication.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/shell/command_volume_fix_replication.go b/weed/shell/command_volume_fix_replication.go index 735d07800..061a58891 100644 --- a/weed/shell/command_volume_fix_replication.go +++ b/weed/shell/command_volume_fix_replication.go @@ -79,6 +79,10 @@ func (c *commandVolumeFixReplication) Do(args []string, commandEnv *CommandEnv, allLocations = append(allLocations, loc) }) + if len(allLocations) == 0 { + return fmt.Errorf("no data nodes at all") + } + // find all under replicated volumes var underReplicatedVolumeIds, overReplicatedVolumeIds []uint32 for vid, replicas := range volumeReplicas { @@ -100,10 +104,6 @@ func (c *commandVolumeFixReplication) Do(args []string, commandEnv *CommandEnv, return nil } - if len(allLocations) == 0 { - return fmt.Errorf("no data nodes at all") - } - // find the most under populated data nodes keepDataNodesSorted(allLocations) |
