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


##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/execution/ExecuteResponseObserver.scala:
##########
@@ -179,7 +179,7 @@ private[connect] class ExecuteResponseObserver[T <: 
MessageLite](val executeHold
   }
 
   /** Get the index in the stream for given response id. */
-  def getResponseIndexById(responseId: String): Long = {
+  def getResponseIndexById(responseId: String): Long = synchronized {

Review Comment:
   nit pick. try to avoid using locks on the object itself. there is a chance 
that some will assume that they can take a lock on it as well....



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