-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
producer panic when retrying send the message #2322
Comments
Just hit the same issue. It feels like a race condition from what we are seeing, but we didn't look very deeply into it. Did anyone already debug this? :-) |
The same problem also happens to
|
Check nil and update the leader, if needed, before updating the new watermark Refs: IBM#2322
This problem still exists in the latest version that has been released. The more serious consequence is that the producer will enter a state of stopping work and no longer report any errors. The application usually enters a blocking production state and cannot perceive that the producer has failed. |
@dnwe Do you have better suggestions or patches? |
Check nil and update the leader, if needed, before updating the new watermark Refs: #2322
A previous update (cockroachdb#95544) which updated sarama to 1.35.0 introduced a bug which resulted in nodes crashing. These failures are shown by cockroachdb#96419. The bug in described in detail in IBM/sarama#2322 and fixed by IBM/sarama@2379257, which is included in version 1.38.1. Fixes: cockroachdb#96419 Release note: None Epic: None
97571: cdc: update sarama from 1.35.0 to 1.38.1 r=miretskiy a=jayshrivastava A previous update (#95544) which updated sarama to 1.35.0 introduced a bug which resulted in nodes crashing. These failures are shown by #96419. The bug in described in detail in IBM/sarama#2322 and fixed by IBM/sarama@2379257, which is included in version 1.38.1. Fixes: #96419 Release note: None Epic: None Co-authored-by: Jayant Shrivastava <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
Fixed in v1.38.0 |
Versions
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Configuration
What configuration values are you using for Sarama and Kafka?
Logs
When filing an issue please provide logs from Sarama and Kafka if at all
possible. You can set
sarama.Logger
to alog.Logger
to capture Sarama debugoutput.
logs: CLICK ME
Problem Description
producer panic when Kafka cluster has no partition leader
related code:
https://github.com/Shopify/sarama/blob/main/async_producer.go#L564
https://github.com/Shopify/sarama/blob/3083a9b96a628fcb0882de334507af5e520ca1cb/async_producer.go#L620
need to check the
brokerProducer
before send message (no matter normal send or retry)https://github.com/Shopify/sarama/blob/3083a9b96a628fcb0882de334507af5e520ca1cb/async_producer.go#L612-L626
The text was updated successfully, but these errors were encountered: