GitHub user becketqin opened a pull request: https://github.com/apache/kafka/pull/221
KAFKA-2555: Infinite recursive function call when call commitSync in ⦠@hachikuji @ewencp I found this problem when adding new consumer to mirror maker which commits offset in the rebalance callback. It is not clear to me why we are triggering rebalance for commitSync() and fetchCommittedOffset(). Can you help review to see if I miss something? Regarding commitSync, After each poll() the partitions will be either assigned to a consumer or it will be already revoked. As long as user is using internal offset map, the offset map will always be valid. i.e. the offset map will always only contain the assigned partitions when commitSync is called. Hence there is no need to trigger a rebalance in commitSync(). The same guarantee also apply to fetchCommittedOffset(), isn't the only requirement is to ensure we know the coordinator? Another related issue is that today the IllegalGenerationIdException is a bit confusing. When we receive an IllegalGenerationIdException from heartbeat, we need to use that same generation Id to commit offset and the coordinator will take it. So the generation ID was not really illegal. I will file a ticket for this issue. You can merge this pull request into a Git repository by running: $ git pull https://github.com/becketqin/kafka KAFKA-2555 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/221.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #221 ---- commit 77b6a59eb926bf99773e7b53bf0e4b1610dc8277 Author: Jiangjie Qin <becket....@gmail.com> Date: 2015-09-18T17:21:27Z KAFKA-2555: Infinite recursive function call when call commitSync in RebalanceListener.onPartitionRevoked() ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---