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

Do not swallow interrupted exception #5421

Merged

Conversation

kokosing
Copy link
Member

@kokosing kokosing commented Oct 5, 2020

Do not swallow interrupted exception

@cla-bot cla-bot bot added the cla-signed label Oct 5, 2020
@kokosing kokosing requested review from wendigo and losipiuk October 5, 2020 21:01
@kokosing
Copy link
Member Author

kokosing commented Oct 5, 2020

Possibly fixes #5422

@kokosing kokosing force-pushed the origin/master/254_stop_with_interrupt branch from 3a3aea6 to b22472f Compare October 6, 2020 07:45
@kokosing
Copy link
Member Author

kokosing commented Oct 6, 2020

@wendigo Added one more commit.

@@ -52,6 +52,7 @@
import static io.airlift.concurrent.Threads.daemonThreadsNamed;
import static io.airlift.units.DataSize.ofBytes;
import static java.lang.String.format;
import static java.lang.Thread.currentThread;
Copy link
Member

Choose a reason for hiding this comment

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

This is typically not static imported

Copy link
Member Author

Choose a reason for hiding this comment

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

Thread.currentThread() looks like ImmutableList.toImmutableList()

Copy link
Member Author

Choose a reason for hiding this comment

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

I applied your comment. I see that this is common. I will leave it for another time.

Copy link
Member

Choose a reason for hiding this comment

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

Thread.currentThread() looks like ImmutableList.toImmutableList()

the similarity is deceptive

Copy link
Member

@findepi findepi left a comment

Choose a reason for hiding this comment

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

%

Catching Exception is very broad and error prone. This refactor changes
that to catch only exceptions that are possibly thrown.
@kokosing
Copy link
Member Author

kokosing commented Oct 6, 2020

Failed with: #5427

@kokosing kokosing merged commit 4cddd84 into trinodb:master Oct 6, 2020
@kokosing kokosing deleted the origin/master/254_stop_with_interrupt branch October 6, 2020 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants