You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/05/12 10:43:48 UTC

[GitHub] [iotdb] MinaQin opened a new issue, #5877: Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here.

MinaQin opened a new issue, #5877:
URL: https://github.com/apache/iotdb/issues/5877

   Code Path: cluster/src/main/java/org/apache/iotdb/cluster/log/catchup/CatchUpTask.java
   <img width="907" alt="image" src="https://user-images.githubusercontent.com/55030443/168053398-0d2df723-bec0-48c3-a0fa-7e79370cd7e5.png">
   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.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] github-actions[bot] commented on issue #5877: Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #5877:
URL: https://github.com/apache/iotdb/issues/5877#issuecomment-1124839634

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] qiaojialin closed issue #5877: Use try-with-resources or close this "SessionDataSet" in a "finally" clause.

Posted by GitBox <gi...@apache.org>.
qiaojialin closed issue #5877: Use try-with-resources or close this "SessionDataSet" in a "finally" clause.
URL: https://github.com/apache/iotdb/issues/5877


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org