diff options
author | Dana Powers <dana.powers@rd.io> | 2016-01-10 22:58:11 -0800 |
---|---|---|
committer | Dana Powers <dana.powers@rd.io> | 2016-01-10 23:00:10 -0800 |
commit | 1c4a8bfc671282c002e39fd67afd5f4ccef0ee4c (patch) | |
tree | f9685053fb7946f7dab0fb55fe95f9d60c7bdaff | |
parent | 458bdb50f62a0fa2556bca11cf6cc68c6e935ca6 (diff) | |
download | kafka-python-1c4a8bfc671282c002e39fd67afd5f4ccef0ee4c.tar.gz |
Update docstring and comments in _create_fetch_requests re KAFKA-2978
-rw-r--r-- | kafka/consumer/fetcher.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/kafka/consumer/fetcher.py b/kafka/consumer/fetcher.py index c7d567e..fe29e77 100644 --- a/kafka/consumer/fetcher.py +++ b/kafka/consumer/fetcher.py @@ -492,8 +492,7 @@ class Fetcher(six.Iterator): def _create_fetch_requests(self): """Create fetch requests for all assigned partitions, grouped by node. - FetchRequests skipped if no leader, node has requests in flight, or we - have not returned all previously fetched records to consumer + FetchRequests skipped if no leader, or node has requests in flight Returns: dict: {node_id: [FetchRequest,...]} @@ -509,9 +508,7 @@ class Fetcher(six.Iterator): " Requesting metadata update", partition) self._client.cluster.request_update() elif self._client.in_flight_request_count(node_id) == 0: - # if there is a leader and no in-flight requests, - # issue a new fetch but only fetch data for partitions whose - # previously fetched data has been consumed + # fetch if there is a leader and no in-flight requests position = self._subscriptions.assignment[partition].position partition_info = ( partition.partition, |