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
Revert "Merge pull request #3159 from shichanglin5/_duplicateUUID"
chrislu9f8b72a54d8c
diff --git a/weed/server/volume_grpc_client_to_master.go b/weed/server/volume_grpc_client_to_master.goindex a7b75d6a56..d4f3b28536 100644--- a/weed/server/volume_grpc_client_to_master.go+++ b/weed/server/volume_grpc_client_to_master.go@@ -119,30 +119,16 @@ func (vs *VolumeServer) doHeartbeat(masterAddress pb.ServerAddress, grpcDialOptireturn}if len(in.DuplicatedUuids) > 0 {- var duplicatedDir []string-- foundDuplicate := false- duplicateSet := make(map[string]struct{})+ var duplictedDir []stringfor _, loc := range vs.store.Locations {- directoryUuid := loc.DirectoryUuid- if _, exists := duplicateSet[directoryUuid]; !exists {- duplicateSet[directoryUuid] = struct{}{}- } else {- foundDuplicate = true- }-for _, uuid := range in.DuplicatedUuids {- if uuid == directoryUuid {- duplicatedDir = append(duplicatedDir, loc.Directory)+ if uuid == loc.DirectoryUuid {+ duplictedDir = append(duplictedDir, loc.Directory)}}}- if foundDuplicate {- glog.Errorf("Shut down Volume Server due to duplicated volume directories: %v", duplicatedDir)- os.Exit(1)- } else {- glog.Warningf("Receive response of duplicated volume directories: %v, ignored(the check found no duplicates)", duplicatedDir)- }+ glog.Errorf("Shut down Volume Server due to duplicated volume directories: %v", duplictedDir)+ os.Exit(1)}if in.GetVolumeSizeLimit() != 0 && vs.store.GetVolumeSizeLimit() != in.GetVolumeSizeLimit() {vs.store.SetVolumeSizeLimit(in.GetVolumeSizeLimit())diff --git a/weed/storage/volume.go b/weed/storage/volume.goindex fc77fa63a5..3539efa852 100644--- a/weed/storage/volume.go+++ b/weed/storage/volume.go@@ -293,6 +293,7 @@ func (v *Volume) collectStatus() (maxFileKey types.NeedleId, datFileSize int64,fileCount = uint64(v.nm.FileCount())deletedCount = uint64(v.nm.DeletedCount())deletedSize = v.nm.DeletedSize()+ fileCount = uint64(v.nm.FileCount())return}