hvanhovell commented on code in PR #42355:
URL: https://github.com/apache/spark/pull/42355#discussion_r1285254302


##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/execution/ExecuteGrpcResponseSender.scala:
##########
@@ -58,6 +61,39 @@ private[connect] class ExecuteGrpcResponseSender[T <: 
MessageLite](
     detached = true
   }
 
+  def run(lastConsumedStreamIndex: Long): Unit = {
+
+    // In reattachable execution, we check if grpcCallObserver is ready for 
sending.
+    // See sendResponse
+    if (executeHolder.reattachable && flowControl) {
+      val grpcCallObserver = 
grpcObserver.asInstanceOf[ServerCallStreamObserver[T]]
+      grpcCallObserver.setOnReadyHandler(() => {
+        val e = new Exception()
+        logError(s"ON READY\n${e.getStackTrace.mkString("\n")}")
+        grpcCallObserverReadySignal.synchronized {
+          grpcCallObserverReadySignal.notifyAll()
+        }
+      })
+    }
+
+    // We run in a separate daemon thread
+    val t = new Thread {

Review Comment:
   Please give the thread a name that is understandable.



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