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

Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here. #5876

Closed
xingtanzjr opened this issue May 12, 2022 · 2 comments

Comments

@xingtanzjr
Copy link
Contributor

Code Path: cluster/src/main/java/org/apache/iotdb/cluster/log/catchup/CatchUpTask.java

image

InterruptedExceptions should never be ignored in the code, and simply logging the exception counts in this case as "ignoring". The throwing of the InterruptedException clears the interrupted state of the Thread, so if the exception is not handled properly the information that the thread was interrupted will be lost. Instead, InterruptedExceptions should either be rethrown - immediately or after cleaning up the method’s state - or the thread should be re-interrupted by calling Thread.interrupt() even if this is supposed to be a single-threaded application. Any other course of action risks delaying thread shutdown and loses the information that the thread was interrupted - probably without finishing its task.

@github-actions
Copy link

Hi, this is your first issue in IoTDB project. Thanks for your report. Welcome to join the community!

@HTHou
Copy link
Contributor

HTHou commented Jul 15, 2022

This issue is no longer valid since the old cluster module has been removed.

@HTHou HTHou closed this as completed Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants