Commit 55b4451
committed
Fix ConsumerGroup._checkTopicPartitionCheck
Previous behavior only check topics that this consumer is subscribed,
if two consumer with same group id subscribed to different topic, group
master cannot check topic partition change correctly, and rejoin the
whole group each time such check is scheduled.
This is because this.topicPartitionLength is initialized when joining
group and contains all the topics that has been subscribed by this
group, while this.topics may not contains all the topics. In such
condition:
```
const topicOrPartitionsChanged = _.some(this.topicPartitionLength, function (numberOfPartitions, topic) {
return numberOfPartitions !== _.get(metadata, `['${topic}'].length`, 0);
});
```
So `topicPartitionChanged` will always be caculated to be true.1 parent fcc8aef commit 55b4451
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
| 322 | + | |
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
| |||
0 commit comments