Skip to content

MINOR: ConsumerNetworkClient does not need to send the remaining requests when the node is not ready#6264

Merged
guozhangwang merged 1 commit intoapache:trunkfrom
lambdaliu:fix_try_send
Mar 1, 2019
Merged

MINOR: ConsumerNetworkClient does not need to send the remaining requests when the node is not ready#6264
guozhangwang merged 1 commit intoapache:trunkfrom
lambdaliu:fix_try_send

Conversation

@lambdaliu
Copy link
Copy Markdown
Contributor

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)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@lambdaliu
Copy link
Copy Markdown
Contributor Author

retest this please

if (client.ready(node, now)) {
client.send(request, now);
iterator.remove();
} else {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good point. Makes sense.

@FreeeeLy
Copy link
Copy Markdown
Contributor

retest this please

Copy link
Copy Markdown
Contributor

@guozhangwang guozhangwang left a comment

Choose a reason for hiding this comment

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

THanks @lambdaliu LGTM.

@guozhangwang guozhangwang merged commit caecc16 into apache:trunk Mar 1, 2019
@ijuma
Copy link
Copy Markdown
Member

ijuma commented Mar 2, 2019

Did we consider adding any tests for this? Since there a change in behaviour, it would be good to have a test.

@guozhangwang
Copy link
Copy Markdown
Contributor

That's good point. @lambdaliu could you file a follow-up PR adding the unit test on ConsumerNetworkClientTest

@lambdaliu
Copy link
Copy Markdown
Contributor Author

No problem. I'll do it later.

jarekr pushed a commit to confluentinc/kafka that referenced this pull request Apr 18, 2019
* 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)
pengxiaolong pushed a commit to pengxiaolong/kafka that referenced this pull request Jun 14, 2019
…ests when the node is not ready (apache#6264)

Reviewers: Guozhang Wang <wangguoz@gmail.com>
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