-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Send a produce request in handshake state #2666
Labels
Milestone
Comments
Debug log with
|
Hi @edenhill , any progress? |
Hi @edenhill , make some spare time to keep an eye on this question? |
We'll fix this for the upcoming v1.4.0 release. Thank you |
Great root cause analysis! |
edenhill
added a commit
that referenced
this issue
Feb 5, 2020
…quest priorities (@xzxxzx401, #2666)
edenhill
added a commit
that referenced
this issue
Feb 5, 2020
…quest priorities (@xzxxzx401, #2666)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Read the FAQ first: https://github.com/edenhill/librdkafka/wiki/FAQ
Description
We found that rdkafka may send ProduceRequest or MetadataRequest when new connection just created, which should send APIVersionQuery or SaslHandShakeRequests first.
Our 0.10.1 broker has these debug logs:
In 2.3 broker, similar log also appears. But 2.3 add check for the length of an expected HandshakeRequest, which will reject requests longer than 500KB in handshake state. Our ProduceRequests is approximatly 1MB and will be rejected.
Deep into rdkafka code(both 0.11.5 and master), we found that in
rd_kafka_bufq_connection_reset
, rdkafka will only set buffer send ptr to 0, but will not resetrkbuf_corrid
to 0. And inrd_kafka_broker_buf_enq0
, rdkafka will insert a ApiVersionQuery or SaslHandShakeRequests after all requests whichrkbuf_corrid
is not 0.So if a broker restart when a ProduceRequest is partially sent, then this ProduceRequest has a corrid larger than 0. Then after new connection established, it will be sent before any other requests. Is this meet excepted? I think we should finish ApiversionQuery and SaslHandshake first.
How to reproduce
Enable sasl, then restart a broker when rdkafka partially send a request.
IMPORTANT: Always try to reproduce the issue on the latest released version (see https://github.com/edenhill/librdkafka/releases), if it can't be reproduced on the latest version the issue has been fixed.
Checklist
IMPORTANT: We will close issues where the checklist has not been completed.
Please provide the following information:
v0.11.5
andmaster
0.10.1
and2.3.0
SASL_PLAINTEXT enabled
,api.version.fallback.ms=0
for our broker support ApiVersionQuerydebian8 and 9
debug=..
as necessary) from librdkafkaThe text was updated successfully, but these errors were encountered: