MINOR: ConsumerNetworkClient does not need to send the remaining requests when the node is not ready#6264
Conversation
…en the node is not ready
|
retest this please |
| if (client.ready(node, now)) { | ||
| client.send(request, now); | ||
| iterator.remove(); | ||
| } else { |
There was a problem hiding this comment.
I'm wondering if it is better to do the client.ready() check outside the while loop? If the client is not ready, it will not become ready during the while loop, and vice versa. WDYT @hachikuji ?
There was a problem hiding this comment.
Hi @guozhangwang, thank you for your review. IMHO, client.ready() also checks the number of in-flight requests. and the client will become not ready when the number of in-flight requests reaches maxInFlightRequestsPerConnection.
There was a problem hiding this comment.
Good point. Makes sense.
|
retest this please |
guozhangwang
left a comment
There was a problem hiding this comment.
THanks @lambdaliu LGTM.
|
Did we consider adding any tests for this? Since there a change in behaviour, it would be good to have a test. |
|
That's good point. @lambdaliu could you file a follow-up PR adding the unit test on ConsumerNetworkClientTest |
|
No problem. I'll do it later. |
* apache/trunk: KAFKA-7880:Naming worker thread by task id (apache#6275) improve some logging statements (apache#6078) KAFKA-7312: Change broker port used in testMinimumRequestTimeouts and testForceClose KAFKA-7997: Use automatic RPC generation in SaslAuthenticate KAFKA-8002; Log dir reassignment stalls if future replica has different segment base offset (apache#6346) KAFKA-3522: Add TimestampedKeyValueStore builder/runtime classes (apache#6152) HOTFIX: add igore import to streams_upgrade_test MINOR: ConsumerNetworkClient does not need to send the remaining requests when the node is not ready (apache#6264) KAFKA-7922: Return authorized operations in describe consumer group responses (KIP-430 Part-1) KAFKA-7918: Inline generic parameters Pt. III: in-memory window store (apache#6328) KAFKA-8012; Ensure partitionStates have not been removed before truncating. (apache#6333) KAFKA-8011: Fix for race condition causing concurrent modification exception (apache#6338) KAFKA-7912: Support concurrent access in InMemoryKeyValueStore (apache#6336) MINOR: Skip quota check when replica is in sync (apache#6344) HOTFIX: Change header back to http instead of https to path license header test (apache#6347) MINOR: fix release.py script (apache#6317) MINOR: Remove types from caching stores (apache#6331) MINOR: Improve logging for alter log dirs (apache#6302) MINOR: state.cleanup.delay.ms default is 600,000 ms (10 minutes). (apache#6345) MINOR: disable Streams system test for broker upgrade/downgrade (apache#6341)
…ests when the node is not ready (apache#6264) Reviewers: Guozhang Wang <wangguoz@gmail.com>
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)