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
fix(master): route ec shard vids to NewEcVids on initial subscribe (#9435)
Chris Lu514ba7a233e3
diff --git a/weed/topology/topology_info.go b/weed/topology/topology_info.goindex 5749f86699..dd1f59d291 100644--- a/weed/topology/topology_info.go+++ b/weed/topology/topology_info.go@@ -102,8 +102,17 @@ func (t *Topology) ToVolumeLocations() (volumeLocations []*master_pb.VolumeLocatfor _, v := range dn.GetVolumes() {volumeLocation.NewVids = append(volumeLocation.NewVids, uint32(v.Id))}+ // A single EC volume's shards can live on multiple disks of+ // one DataNode, so GetEcShards returns per-(vid,disk) entries.+ // Dedupe so the snapshot carries each vid once.+ seenEcVids := make(map[uint32]struct{})for _, s := range dn.GetEcShards() {- volumeLocation.NewVids = append(volumeLocation.NewVids, uint32(s.VolumeId))+ vid := uint32(s.VolumeId)+ if _, ok := seenEcVids[vid]; ok {+ continue+ }+ seenEcVids[vid] = struct{}{}+ volumeLocation.NewEcVids = append(volumeLocation.NewEcVids, vid)}volumeLocations = append(volumeLocations, volumeLocation)}