attilapiros commented on code in PR #38518: URL: https://github.com/apache/spark/pull/38518#discussion_r1143681244
########## resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsWatchSnapshotSource.scala: ########## @@ -45,7 +46,9 @@ class ExecutorPodsWatchSnapshotSource( conf: SparkConf) extends Logging { private var watchConnection: Closeable = _ Review Comment: The `Watcher` is running on a separate thread, right? And `watchConnection` sometimes accessed from one thread via the `ExecutorPodsWatchSnapshotSource#stop()` and sometimes from the watcher running thread via the `ExecutorPodsWatchSnapshotSource#reset()`. So those methods where `watchConnection` is accessed start(), stop() and reset() must be synchronized. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org