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

Recover from Selector IOException #8569

Merged
merged 1 commit into from
Nov 19, 2018
Merged

Recover from Selector IOException #8569

merged 1 commit into from
Nov 19, 2018

Conversation

normanmaurer
Copy link
Member

Motivation:

When the Selector throws an IOException during our EventLoop processing we should rebuild it and transfer the registered Channels. At the moment we will continue trying to use it which will never work.

Modifications:

  • Rebuild Selector when an IOException is thrown during any select*(...) methods.
  • Add unit test.

Result:

Fixes #8566.

Motivation:

When the Selector throws an IOException during our EventLoop processing we should rebuild it and transfer the registered Channels. At the moment we will continue trying to use it which will never work.

Modifications:

- Rebuild Selector when an IOException is thrown during any select*(...) methods.
- Add unit test.

Result:

Fixes #8566.
Copy link
Member

@carl-mastrangelo carl-mastrangelo left a comment

Choose a reason for hiding this comment

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

LGTM

@normanmaurer normanmaurer merged commit 278b49b into 4.1 Nov 19, 2018
@normanmaurer normanmaurer deleted the nio_selector_recover branch November 19, 2018 06:41
@normanmaurer normanmaurer added this to the 4.1.32.Final milestone Nov 19, 2018
@@ -401,7 +401,8 @@ private void rebuildSelector0() {
protected void run() {
for (;;) {
try {
switch (selectStrategy.calculateStrategy(selectNowSupplier, hasTasks())) {
try {
switch (selectStrategy.calculateStrategy(selectNowSupplier, hasTasks())) {
case SelectStrategy.CONTINUE:
Copy link
Contributor

Choose a reason for hiding this comment

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

fix indenting?

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.

3 participants