aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_volume_tier_upload.go
diff options
context:
space:
mode:
authorrhysm <rhysm@users.noreply.github.com>2024-07-04 10:51:25 +1200
committerGitHub <noreply@github.com>2024-07-03 15:51:25 -0700
commit7ee1f520a4b1b200fa7ff71e9d22dff903ae59a4 (patch)
treef356bf8d173bdf0d45b758bdc362f176e474ae14 /weed/shell/command_volume_tier_upload.go
parent8943a572d8c742fd1d095623dc4cda0ea49e026c (diff)
downloadseaweedfs-7ee1f520a4b1b200fa7ff71e9d22dff903ae59a4.tar.xz
seaweedfs-7ee1f520a4b1b200fa7ff71e9d22dff903ae59a4.zip
volume.tier.upload: Fix deleting replicated volumes (#5743)
Co-authored-by: Rhys M <rhysm@protonmail.com>
Diffstat (limited to 'weed/shell/command_volume_tier_upload.go')
-rw-r--r--weed/shell/command_volume_tier_upload.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/shell/command_volume_tier_upload.go b/weed/shell/command_volume_tier_upload.go
index 6932317ab..cb805b0cf 100644
--- a/weed/shell/command_volume_tier_upload.go
+++ b/weed/shell/command_volume_tier_upload.go
@@ -113,11 +113,14 @@ func doVolumeTierUpload(commandEnv *CommandEnv, writer io.Writer, collection str
return fmt.Errorf("copy dat file for volume %d on %s to %s: %v", vid, existingLocations[0].Url, dest, err)
}
+ if keepLocalDatFile {
+ return nil
+ }
// now the first replica has the .idx and .vif files.
// ask replicas on other volume server to delete its own local copy
for i, location := range existingLocations {
if i == 0 {
- break
+ continue
}
fmt.Printf("delete volume %d from %s\n", vid, location.Url)
err = deleteVolume(commandEnv.option.GrpcDialOption, vid, location.ServerAddress(), false)