jingz-db commented on code in PR #48884:
URL: https://github.com/apache/spark/pull/48884#discussion_r1847254853
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/python/TransformWithStateInPandasStateServer.scala:
##########
@@ -758,3 +760,12 @@ case class MapStateInfo(
keySerializer: ExpressionEncoder.Serializer[Row],
valueDeserializer: ExpressionEncoder.Deserializer[Row],
valueSerializer: ExpressionEncoder.Serializer[Row])
+
+object TransformWithStateInPandasStateServer {
+ @volatile private var id = 0
Review Comment:
IIUC, `TransformWithStateInPandasPythonRunner` is instantiated per executor
so they are in different JVMs, and `TransformWithStateInPandasStateServer` is
initialized from each `TransformWithStateInPandasPythonRunner` once. What could
be the scenario for handling multiple threads here?
--
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]