Skip to content

Commit b60df8d

Browse files
committed
Add more debug/trace statements to sender loop
1 parent 22a1b6d commit b60df8d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kafka/producer/sender.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,15 @@ def run_once(self):
9797
# if there are any partitions whose leaders are not known yet, force
9898
# metadata update
9999
if unknown_leaders_exist:
100+
log.debug('Unknown leaders exist, requesting metadata update')
100101
with self._lock:
101102
self._metadata.request_update()
102103

103104
# remove any nodes we aren't ready to send to
104105
not_ready_timeout = 999999999
105106
for node in list(ready_nodes):
106107
if not self._client.ready(node):
108+
log.debug('Node %s not ready; delaying produce of accumulated batch', node)
107109
ready_nodes.remove(node)
108110
not_ready_timeout = min(not_ready_timeout,
109111
self._client.connection_delay(node))

0 commit comments

Comments
 (0)