aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2024-05-29 16:18:02 -0700
committerchrislu <chris.lu@gmail.com>2024-05-29 16:18:02 -0700
commitf0b9e163a025077b8a370deabaf5773409eb67a1 (patch)
tree3eab94e6ca66eb0061bc7fedada7cc6e5e6b7d53
parenta5874954dc36d0d3ea9ae4afca0abeb33af3379c (diff)
downloadseaweedfs-f0b9e163a025077b8a370deabaf5773409eb67a1.tar.xz
seaweedfs-f0b9e163a025077b8a370deabaf5773409eb67a1.zip
avoid nil stopChan
-rw-r--r--weed/mq/sub_coordinator/consumer_group.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/mq/sub_coordinator/consumer_group.go b/weed/mq/sub_coordinator/consumer_group.go
index fcb305b33..247434288 100644
--- a/weed/mq/sub_coordinator/consumer_group.go
+++ b/weed/mq/sub_coordinator/consumer_group.go
@@ -24,6 +24,7 @@ func NewConsumerGroup(t *mq_pb.Topic, reblanceSeconds int32, filerClientAccessor
topic: topic.FromPbTopic(t),
ConsumerGroupInstances: cmap.New[*ConsumerGroupInstance](),
filerClientAccessor: filerClientAccessor,
+ stopCh: make(chan struct{}),
}
if conf, err := cg.filerClientAccessor.ReadTopicConfFromFiler(cg.topic); err == nil {
var partitions []topic.Partition
@@ -53,8 +54,8 @@ func NewConsumerGroup(t *mq_pb.Topic, reblanceSeconds int32, filerClientAccessor
Message: &mq_pb.SubscriberToSubCoordinatorResponse_Assignment_{
Assignment: &mq_pb.SubscriberToSubCoordinatorResponse_Assignment{
PartitionAssignment: &mq_pb.BrokerPartitionAssignment{
- Partition: adjustment.partition.ToPbPartition(),
- LeaderBroker: assignment.LeaderBroker,
+ Partition: adjustment.partition.ToPbPartition(),
+ LeaderBroker: assignment.LeaderBroker,
FollowerBroker: assignment.FollowerBroker,
},
},