aboutsummaryrefslogtreecommitdiff
path: root/weed/shell
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-09-09 11:21:23 -0700
committerChris Lu <chris.lu@gmail.com>2020-09-09 11:21:23 -0700
commit387ab6796f274151f802ccdab8756b959b5fb1cb (patch)
treea3b95f5bdba66f12c609b5e53b262b011a47a450 /weed/shell
parent4fc0bd1a8173e284ff919edb5214f5adf7a90f06 (diff)
downloadseaweedfs-387ab6796f274151f802ccdab8756b959b5fb1cb.tar.xz
seaweedfs-387ab6796f274151f802ccdab8756b959b5fb1cb.zip
filer: cross cluster synchronization
Diffstat (limited to 'weed/shell')
-rw-r--r--weed/shell/command_bucket_delete.go2
-rw-r--r--weed/shell/command_volume_fix_replication.go8
2 files changed, 5 insertions, 5 deletions
diff --git a/weed/shell/command_bucket_delete.go b/weed/shell/command_bucket_delete.go
index 03c878e6a..02790b9e2 100644
--- a/weed/shell/command_bucket_delete.go
+++ b/weed/shell/command_bucket_delete.go
@@ -49,6 +49,6 @@ func (c *commandBucketDelete) Do(args []string, commandEnv *CommandEnv, writer i
return fmt.Errorf("read buckets: %v", err)
}
- return filer_pb.Remove(commandEnv, filerBucketsPath, *bucketName, false, true, true, false, 0)
+ return filer_pb.Remove(commandEnv, filerBucketsPath, *bucketName, false, true, true, false, nil)
}
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)