SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
wait for goroutines
Chris Lu85832d02c0a4
diff --git a/weed/shell/command_volume_tier_move.go b/weed/shell/command_volume_tier_move.goindex d370d93e42..9719b442d8 100644--- a/weed/shell/command_volume_tier_move.go+++ b/weed/shell/command_volume_tier_move.go@@ -109,6 +109,7 @@ func (c *commandVolumeTierMove) doVolumeTierMove(commandEnv *CommandEnv, writerhasFoundTarget := falsekeepDataNodesSorted(allLocations, toDiskType)fn := capacityByFreeVolumeCount(toDiskType)+ wg := sync.WaitGroup{}for _, dst := range allLocations {if fn(dst.dataNode) > 0 && !hasFoundTarget {// ask the volume server to replicate the volume@@ -145,6 +146,7 @@ func (c *commandVolumeTierMove) doVolumeTierMove(commandEnv *CommandEnv, writerc.activeServers[dst.dataNode.Id] = struct{}{}c.activeServersCond.L.Unlock()+ wg.Add(1)go func(dst location) {if err := c.doMoveOneVolume(commandEnv, writer, vid, toDiskType, locations, sourceVolumeServer, dst); err != nil {fmt.Fprintf(writer, "move volume %d %s => %s: %v\n", vid, sourceVolumeServer, dst.dataNode.Id, err)@@ -152,11 +154,14 @@ func (c *commandVolumeTierMove) doVolumeTierMove(commandEnv *CommandEnv, writerdelete(c.activeServers, sourceVolumeServer)delete(c.activeServers, dst.dataNode.Id)c.activeServersCond.Signal()+ wg.Done()}(dst)}}+ wg.Wait()+if !hasFoundTarget {fmt.Fprintf(writer, "can not find disk type %s for volume %d\n", toDiskType.ReadableString(), vid)}