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
Code comment optimization
石昌林f1ea906c1317
diff --git a/weed/wdclient/masterclient.go b/weed/wdclient/masterclient.goindex 154074fc39..da151ddcf5 100644--- a/weed/wdclient/masterclient.go+++ b/weed/wdclient/masterclient.go@@ -127,22 +127,21 @@ func (mc *MasterClient) tryConnectToMaster(master pb.ServerAddress) (nextHintedL}glog.V(1).Infof("%s.%s masterClient Connected to %v", mc.FilerGroup, mc.clientType, master)- //reset vidMap only when masterClient successfully connected to new leaderresp, err := stream.Recv()if err != nil {glog.V(0).Infof("%s.%s masterClient failed to receive from %s: %v", mc.FilerGroup, mc.clientType, master, err)stats.MasterClientConnectCounter.WithLabelValues(stats.FailedToReceive).Inc()return err}- if resp.VolumeLocation != nil {- //immediately check whether it is the leader- if resp.VolumeLocation.Leader != "" {- glog.V(0).Infof("redirected to leader %v", resp.VolumeLocation.Leader)- nextHintedLeader = pb.ServerAddress(resp.VolumeLocation.Leader)- stats.MasterClientConnectCounter.WithLabelValues(stats.RedirectedToleader).Inc()- return nil- }++ // check if it is the leader to determine whether to reset the vidMap+ if resp.VolumeLocation != nil && resp.VolumeLocation.Leader != "" {+ glog.V(0).Infof("redirected to leader %v", resp.VolumeLocation.Leader)+ nextHintedLeader = pb.ServerAddress(resp.VolumeLocation.Leader)+ stats.MasterClientConnectCounter.WithLabelValues(stats.RedirectedToleader).Inc()+ return nil}+mc.currentMaster = mastermc.vidMap = newVidMap("")