kafka icon indicating copy to clipboard operation
kafka copied to clipboard

KAFKA-6846: Throw InterruptedException after poll in awaitReady() and sendAndReceive() if the interrupt flag is set

Open hzxa21 opened this issue 7 years ago • 5 comments

This PR resolves the issue that controller can spend a long time (more than 60s) in processing BrokerChange event when there are dead brokers, by throwing InterruptedException in the right place if the RequestSendThread sees the interrupt flag is set. In this case, RequestSendThread can break the poll loop before timeout to finish the shutdown and unblock the controller event thread, who is waiting for RequestSendThread to shutdown when removing the broker.

Committer Checklist (excluded from commit message)

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

hzxa21 avatar May 02 '18 21:05 hzxa21

Thanks for the patch. LGTM overall. Can we add a unit test?

becketqin avatar May 02 '18 21:05 becketqin

@becketqin Thanks for the review. I have added a unit test and update the PR. Could you take a look again?

hzxa21 avatar May 04 '18 05:05 hzxa21

@becketqin Ping Becket for review. Thanks!

hzxa21 avatar Jul 18 '18 00:07 hzxa21

@hachikuji Thanks for your review. I have updated the PR to address all the comments.

hzxa21 avatar Jul 20 '18 22:07 hzxa21

This PR is being marked as stale since it has not had any activity in 90 days. If you would like to keep this PR alive, please leave a comment asking for a review. If the PR has merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact).

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

github-actions[bot] avatar Oct 21 '24 03:10 github-actions[bot]

This PR has been closed since it has not had any activity in 120 days. If you feel like this was a mistake, or you would like to continue working on it, please feel free to re-open the PR and ask for a review.

github-actions[bot] avatar Nov 21 '24 03:11 github-actions[bot]