mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-08-25 00:08:33 +08:00
volume.tier.upload: Fix deleting replicated volumes (#5743)
Co-authored-by: Rhys M <rhysm@protonmail.com>
This commit is contained in:
parent
8943a572d8
commit
7ee1f520a4
@ -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)
|
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.
|
// now the first replica has the .idx and .vif files.
|
||||||
// ask replicas on other volume server to delete its own local copy
|
// ask replicas on other volume server to delete its own local copy
|
||||||
for i, location := range existingLocations {
|
for i, location := range existingLocations {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
break
|
continue
|
||||||
}
|
}
|
||||||
fmt.Printf("delete volume %d from %s\n", vid, location.Url)
|
fmt.Printf("delete volume %d from %s\n", vid, location.Url)
|
||||||
err = deleteVolume(commandEnv.option.GrpcDialOption, vid, location.ServerAddress(), false)
|
err = deleteVolume(commandEnv.option.GrpcDialOption, vid, location.ServerAddress(), false)
|
||||||
|
Loading…
Reference in New Issue
Block a user