aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_volume_tier_upload.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/command_volume_tier_upload.go')
-rw-r--r--weed/shell/command_volume_tier_upload.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/shell/command_volume_tier_upload.go b/weed/shell/command_volume_tier_upload.go
index c109d59d8..6932317ab 100644
--- a/weed/shell/command_volume_tier_upload.go
+++ b/weed/shell/command_volume_tier_upload.go
@@ -139,6 +139,12 @@ func uploadDatToRemoteTier(grpcDialOption grpc.DialOption, writer io.Writer, vol
KeepLocalDatFile: keepLocalDatFile,
})
+ if stream == nil && copyErr == nil {
+ // when the volume is already uploaded, VolumeTierMoveDatToRemote will return nil stream and nil error
+ // so we should directly return in this case
+ fmt.Fprintf(writer, "volume %v already uploaded", volumeId)
+ return nil
+ }
var lastProcessed int64
for {
resp, recvErr := stream.Recv()