lmccay commented on code in PR #495:
URL: https://github.com/apache/incubator-livy/pull/495#discussion_r2729609183


##########
repl/src/main/scala/org/apache/livy/repl/Session.scala:
##########
@@ -212,6 +225,7 @@ class Session(
           info(s"Failed to cancel statement $statementId.")
           statement.compareAndTransit(StatementState.Cancelling, 
StatementState.Cancelled)
         } else {
+          Option(statementThreads.get(statementId)).foreach(_.interrupt())

Review Comment:
   @ArnavBalyan - Can you please verify that this change is only intended to 
interrupt interruptible tasks such as sleep, object.wait, etc? As @gyogal has 
mentioned this will not interrupt actual long running threads.
   
   I am also curious about the fact that this is being called within the while 
loop. Are we waiting for the state to be successfully set to Cancelled instead 
of still Cancelling? The upon failure, we set it to Cancelled after timing out 
therefore it will not try to be interrupted again?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to