Browse Source
volume.tier.upload: Fix deleting replicated volumes (#5743)
Co-authored-by: Rhys M <rhysm@protonmail.com>
pull/5758/head
rhysm
6 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
1 deletions
-
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) |
|
|
|