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
LocalPartition shutdown
chrislue3c8be7f899b
diff --git a/weed/mq/topic/local_partition.go b/weed/mq/topic/local_partition.goindex 8b9970f204..a9f8617107 100644--- a/weed/mq/topic/local_partition.go+++ b/weed/mq/topic/local_partition.go@@ -182,26 +182,26 @@ func (p *LocalPartition) MaybeConnectToFollowers(initMessage *mq_pb.PublishMessa}func (p *LocalPartition) MaybeShutdownLocalPartition() (hasShutdown bool) {- if !p.Publishers.IsEmpty() {- return- }- if !p.Subscribers.IsEmpty() {- return- }- p.LogBuffer.ShutdownLogBuffer()- if p.followerStream != nil {- // send close to the follower- if followErr := p.followerStream.Send(&mq_pb.PublishFollowMeRequest{- Message: &mq_pb.PublishFollowMeRequest_Close{- Close: &mq_pb.PublishFollowMeRequest_CloseMessage{},- },- }); followErr != nil {- glog.Errorf("Error closing follower stream: %v", followErr)+ if p.Publishers.IsEmpty() {+ if p.followerStream != nil {+ // send close to the follower+ if followErr := p.followerStream.Send(&mq_pb.PublishFollowMeRequest{+ Message: &mq_pb.PublishFollowMeRequest_Close{+ Close: &mq_pb.PublishFollowMeRequest_CloseMessage{},+ },+ }); followErr != nil {+ glog.Errorf("Error closing follower stream: %v", followErr)+ }+ glog.V(4).Infof("closing grpcConnection to follower")+ p.followerGrpcConnection.Close()+ p.followerStream = nil}- glog.V(4).Infof("closing grpcConnection to follower")- p.followerGrpcConnection.Close()- p.followerStream = nil+ }++ if p.Publishers.IsEmpty() && p.Subscribers.IsEmpty() {+ p.LogBuffer.ShutdownLogBuffer()+ hasShutdown = true}return