Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/20744#discussion_r173530938
--- Diff:
core/src/main/scala/org/apache/spark/deploy/history/HistoryServer.scala ---
@@ -148,14 +148,17 @@ class HistoryServer(
appId: String,
attemptId: Option[String],
ui: SparkUI,
- completed: Boolean) {
+ completed: Boolean): Unit = this.synchronized {
--- End diff --
Hmm... would it be better to synchronize `SparkUI.attachHandler` and
`SparkUI.detachHandler`? Or maybe restrict the scope of the synchronization
here?
This seems too coarse; in the detach case, it synchronizes around the
`onUIDetached` callback which can do expensive locking and I/O.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]