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
go fmt
Chris Luca8a2bb5345a
diff --git a/weed/server/volume_grpc_copy.go b/weed/server/volume_grpc_copy.goindex 96ea8c3b5c..89788d3c31 100644--- a/weed/server/volume_grpc_copy.go+++ b/weed/server/volume_grpc_copy.go@@ -204,7 +204,7 @@ func (vs *VolumeServer) CopyFile(req *volume_server_pb.CopyFileRequest, stream vbaseFileName := erasure_coding.EcShardBaseFileName(req.Collection, int(req.VolumeId)) + req.Extfor _, location := range vs.store.Locations {tName := path.Join(location.Directory, baseFileName)- if util.FileExists(tName){+ if util.FileExists(tName) {fileName = tName}}diff --git a/weed/storage/disk_location_ec.go b/weed/storage/disk_location_ec.goindex 13797ed4b2..7fb5351a40 100644--- a/weed/storage/disk_location_ec.go+++ b/weed/storage/disk_location_ec.go@@ -34,7 +34,7 @@ func (l *DiskLocation) DestroyEcVolume(vid needle.VolumeId) {ecVolume, found := l.ecVolumes[vid]if found {ecVolume.Destroy()- delete(l.ecVolumes,vid)+ delete(l.ecVolumes, vid)}}diff --git a/weed/storage/erasure_coding/ec_shard.go b/weed/storage/erasure_coding/ec_shard.goindex 7b9f2dc070..2009beb9c6 100644--- a/weed/storage/erasure_coding/ec_shard.go+++ b/weed/storage/erasure_coding/ec_shard.go@@ -64,7 +64,7 @@ func EcShardFileName(collection string, dir string, id int) (fileName string) {func EcShardBaseFileName(collection string, id int) (baseFileName string) {baseFileName = strconv.Itoa(id)if collection != "" {- baseFileName = collection+"_"+baseFileName+ baseFileName = collection + "_" + baseFileName}return}diff --git a/weed/storage/store_ec.go b/weed/storage/store_ec.goindex 4ac01c4a97..960551dc24 100644--- a/weed/storage/store_ec.go+++ b/weed/storage/store_ec.go@@ -221,11 +221,11 @@ func (s *Store) cachedLookupEcShardLocations(ctx context.Context, ecVolume *erasshardCount := len(ecVolume.ShardLocations)if shardCount < erasure_coding.DataShardsCount &&- ecVolume.ShardLocationsRefreshTime.Add(11 * time.Second).After(time.Now()) ||+ ecVolume.ShardLocationsRefreshTime.Add(11*time.Second).After(time.Now()) ||shardCount == erasure_coding.TotalShardsCount &&- ecVolume.ShardLocationsRefreshTime.Add(37 * time.Minute).After(time.Now()) ||+ ecVolume.ShardLocationsRefreshTime.Add(37*time.Minute).After(time.Now()) ||shardCount >= erasure_coding.DataShardsCount &&- ecVolume.ShardLocationsRefreshTime.Add(7 * time.Minute).After(time.Now()) {+ ecVolume.ShardLocationsRefreshTime.Add(7*time.Minute).After(time.Now()) {// still freshreturn nil}diff --git a/weed/topology/topology_ec.go b/weed/topology/topology_ec.goindex c885c90a6a..93b39bb5d4 100644--- a/weed/topology/topology_ec.go+++ b/weed/topology/topology_ec.go@@ -139,7 +139,7 @@ func (t *Topology) ListEcServersByCollection(collection string) (dataNodes []strdateNodeMap := make(map[string]bool)for _, ecVolumeLocation := range t.ecShardMap {if ecVolumeLocation.Collection == collection {- for _, locations := range ecVolumeLocation.Locations{+ for _, locations := range ecVolumeLocation.Locations {for _, loc := range locations {dateNodeMap[string(loc.Id())] = true}