LuciferYang commented on code in PR #49354:
URL: https://github.com/apache/spark/pull/49354#discussion_r1903273970


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/python/TransformWithStateInPandasStateServer.scala:
##########
@@ -146,6 +146,9 @@ class TransformWithStateInPandasStateServer(
 
     while (listeningSocket.isConnected &&
       statefulProcessorHandle.getHandleState != 
StatefulProcessorHandleState.CLOSED) {
+      if (Thread.currentThread().isInterrupted) {
+        throw new InterruptedException("Thread was interrupted")

Review Comment:
   Good point, or should it be placed inside the `try` block? Can we confirm 
that
   ```scala
   val version = inputStream.readInt()
           if (version != -1) {
             assert(version == 0)
             val message = parseProtoMessage()
             handleRequest(message)
             outputStream.flush()
           }
   ```
   
    can respond to Interrupted? Could you help submit a followup to  further 
address this issue?



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to