-
Notifications
You must be signed in to change notification settings - Fork 13.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
MINOR: Fix IllegalStateException in Producer #6607
MINOR: Fix IllegalStateException in Producer #6607
Conversation
A possible explanation for the the illegal state is that the server is requesting the client to throttle itself. In private boolean isReady(NodeConnectionState state, long now) {
return state != null && state.state == ConnectionState.READY && state.throttleUntilTimeMs <= now;
} In Unfortunately, it does not seem to be straightforward to write a test case for this. The best I could suggest is to try to factor out some of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjsax LGTM. I think I'd suggest we change this to a MINOR PR. We can resolve KAFKA-8248 when we have a test case that validates the fix. Sound good?
@@ -452,11 +452,12 @@ private boolean maybeSendTransactionalRequest(long now) { | |||
if (targetNode != null) { | |||
if (nextRequestHandler.isRetry()) | |||
time.sleep(nextRequestHandler.retryBackoffMs()); | |||
long currentTimeMs = time.milliseconds(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... Seems now
is not used anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack. Updated the PR.
Java8 failed with
Seems unrelated. Java11 passed. Retest this please. |
Java11 failed with:
and
Java8 passed. Retest this please. |
It's contained in your PR. Closing this. |
More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)