You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Hi all,
We use Aivens's kafka servers and aiokafka for the client side.
When getting NotLeaderForPartitionError error (documented here), although the error is define invalid_metadata = True and it indeed rerequest the metadata (as it should), the error is keep raising.
We also tried to stop the current producer and create a new object every time this exception is raised. Doing so, the new producer seems to work properly, however the error is keep being printed - Got error produce response on topic-partition TopicPartition(topic='XXXXX', partition=X), retrying. Error: <class 'aiokafka.errors.NotLeaderForPartitionError'>. Also according to the network usage the metadata is keep being asked.
The error is printed until the process is shutdown (which can take days).
According to the server's logs, it behaves properly - changing leader only once in a while (when those errors are starting) but not keep changing it.
Expected behaviour
The producer should recover from this error after requesting the metadata once.
Even when not recovering, a producer that had been stopped shouldn't leak any failing attempt.
Even after leaked, the failing batches should expire after the timeout.
Environment (please complete the following information):
aiokafka version: 0.10.0
Kafka Broker version: 3.6.2
Reproducible example
The producer is created with the following way:
Actually reproducing is difficult, as you must have a setup with Aiven, then you need to make it change the leader and also that not always causes the issue.
The text was updated successfully, but these errors were encountered:
Describe the bug
Hi all,
We use
Aivens
's kafka servers andaiokafka
for the client side.When getting
NotLeaderForPartitionError
error (documented here), although the error is defineinvalid_metadata = True
and it indeed rerequest the metadata (as it should), the error is keep raising.We also tried to stop the current producer and create a new object every time this exception is raised. Doing so, the new producer seems to work properly, however the error is keep being printed -
Got error produce response on topic-partition TopicPartition(topic='XXXXX', partition=X), retrying. Error: <class 'aiokafka.errors.NotLeaderForPartitionError'>
. Also according to the network usage the metadata is keep being asked.The error is printed until the process is shutdown (which can take days).
According to the server's logs, it behaves properly - changing leader only once in a while (when those errors are starting) but not keep changing it.
Expected behaviour
Environment (please complete the following information):
Reproducible example
The producer is created with the following way:
Actually reproducing is difficult, as you must have a setup with Aiven, then you need to make it change the leader and also that not always causes the issue.
The text was updated successfully, but these errors were encountered: