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
Merge branch 'master' into mq
chrislu32dbb6a2ceb8
diff --cc weed/mq/broker/broker_server.goindex f002bf31a7,9e62fe996b..44c2f75763--- a/weed/mq/broker/broker_server.go+++ b/weed/mq/broker/broker_server.go@@@ -1,7 -1,7 +1,8 @@@package brokerimport (+ "github.com/seaweedfs/seaweedfs/weed/filer_client"+ "context""github.com/seaweedfs/seaweedfs/weed/glog""github.com/seaweedfs/seaweedfs/weed/mq/pub_balancer""github.com/seaweedfs/seaweedfs/weed/mq/sub_coordinator"@@@ -62,22 -61,17 +63,22 @@@ func NewMessageBroker(option *MessageQuMasterClient: wdclient.NewMasterClient(grpcDialOption, option.FilerGroup, cluster.BrokerType, option.BrokerAddress(), option.DataCenter, option.Rack, *pb.NewServiceDiscoveryFromMap(option.Masters)),filers: make(map[pb.ServerAddress]struct{}),localTopicManager: topic.NewLocalTopicManager(),- Balancer: pub_broker_balancer,- Coordinator: coordinator,+ PubBalancer: pubBalancer,+ SubCoordinator: subCoordinator,}+ fca := &filer_client.FilerClientAccessor{+ GetFiler: mqBroker.GetFiler,+ GetGrpcDialOption: mqBroker.GetGrpcDialOption,+ }+ mqBroker.fca = fca+ subCoordinator.FilerClientAccessor = fca+mqBroker.MasterClient.SetOnPeerUpdateFn(mqBroker.OnBrokerUpdate)- pub_broker_balancer.OnPartitionChange = mqBroker.Coordinator.OnPartitionChange- pub_broker_balancer.OnAddBroker = mqBroker.Coordinator.OnSubAddBroker- pub_broker_balancer.OnRemoveBroker = mqBroker.Coordinator.OnSubRemoveBroker+ pubBalancer.OnPartitionChange = mqBroker.SubCoordinator.OnPartitionChange- go mqBroker.MasterClient.KeepConnectedToMaster()+ go mqBroker.MasterClient.KeepConnectedToMaster(context.Background())- existingNodes := cluster.ListExistingPeerUpdates(mqBroker.MasterClient.GetMaster(), grpcDialOption, option.FilerGroup, cluster.FilerType)+ existingNodes := cluster.ListExistingPeerUpdates(mqBroker.MasterClient.GetMaster(context.Background()), grpcDialOption, option.FilerGroup, cluster.FilerType)for _, newNode := range existingNodes {mqBroker.OnBrokerUpdate(newNode, time.Now())}