Skip to content
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

bug: handle and log throttled FetchResponses #1383

Merged
merged 1 commit into from
Jun 3, 2019
Merged

bug: handle and log throttled FetchResponses #1383

merged 1 commit into from
Jun 3, 2019

Conversation

dnwe
Copy link
Collaborator

@dnwe dnwe commented May 29, 2019

Kafka 2.2 returns a throttled FetchResponse with an empty array of topics.
Previously Sarama treated this as an ErrIncompleteResponse and would
abandon and re-create the subscription instead of retrying the
FetchRequest.

Kafka returns a throttled FetchResponse with an empty array of topics.
Previously Sarama treated this as an ErrIncompleteResponse and would
abandon and re-create the subscription instead of retrying the
FetchRequest.
Copy link
Contributor

@mimaison mimaison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mimaison
Copy link
Contributor

@bai Since 2.0, Kafka can return an empty FetchResponse in case Quotas are violated (KIP-219).

Without this fix, when this happens, we get an error, for example:

kafka: error while consuming hub-crusher-6partition/0: kafka: response did not contain all the expected topic/partition blocks

@bai
Copy link
Contributor

bai commented Jun 3, 2019

Many thanks!

@bai bai merged commit 49e70e7 into IBM:master Jun 3, 2019
@gaffneyc
Copy link

Should this in some way slow down FetchResponse requests? When we have a process that is behind in messages we've started to see a ton of FetchResponse entries in the log and eventually processing for a single consumer comes to a complete halt.

@dnwe
Copy link
Collaborator Author

dnwe commented Sep 10, 2019

@gaffneyc yes a well-behaved client should backoff its request rate when throttled, but recent broker versions do also enforce this at the backend by sleeping on the socket

@dnwe dnwe deleted the handle-throttled-fetchresponse branch September 10, 2019 14:31
@gaffneyc
Copy link

gaffneyc commented Sep 10, 2019

Okay, to make sure I understand you're saying the server's socket is handling the throttling of requests so nothing needs to be done on the client side? Since we're seeing throttle values of 15s is there any configuration we should do in our client side to deal with that?

What we're seeing is a consumer coming to a complete deadlock and only a consumer rebalance will fix it. I'm guessing it would be better to open a new ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants