Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information