From 6dea93dfdb0b15270d5fd0ed630e21f319d9cea8 Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Tue, 29 Dec 2015 15:46:50 -0800 Subject: [PATCH] Remove recursive client.poll call in ConsumerCoordinator --- kafka/coordinator/consumer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kafka/coordinator/consumer.py b/kafka/coordinator/consumer.py index 119e372..d5e166b 100644 --- a/kafka/coordinator/consumer.py +++ b/kafka/coordinator/consumer.py @@ -182,9 +182,10 @@ class ConsumerCoordinator(AbstractCoordinator): # the leader will begin watching for changes to any of the topics # the group is interested in, which ensures that all metadata changes # will eventually be seen + # Because assignment typically happens within response callbacks, + # we cannot block on metadata updates here (no recursion into poll()) self._subscription.group_subscribe(all_subscribed_topics) - future = self._client.set_topics(self._subscription.group_subscription()) - self._client.poll(future=future) + self._client.set_topics(self._subscription.group_subscription()) log.debug("Performing %s assignment for subscriptions %s", assignor.name, member_metadata)