KafkaAdminClient _send_request_to_node
races with cluster metadata and can enter an infinite loop
#2193
Labels
The problem is this loop:
kafka-python/kafka/admin/client.py
Lines 368 to 371 in 9feeb79
If
node_id
exits the cluster, the code above will be an infinite loop.The code bellow reproduces the bug with these steps:
least_loaded_node()
and do a call to_send_request_to_node
_send_request_to_node
callspoll
and that will eventually updates the metadata, the value ofnode_id
never changes, so the method will block for ever in an infinite loopIt seems the steps above can happen with any of the methods in the class, this is just one example:
kafka-python/kafka/admin/client.py
Line 918 in 9feeb79
To use the script bellow the local ip address has to be used, e.g.
python test.py <ip_address>
The text was updated successfully, but these errors were encountered: