You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Jungtaek Lim (JIRA)" <ji...@apache.org> on 2019/05/22 12:24:00 UTC
[jira] [Commented] (SPARK-27804) LiveListenerBus#addToQueue :
create multiple AsyncEventQueues under race condition
[ https://issues.apache.org/jira/browse/SPARK-27804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16845826#comment-16845826 ]
Jungtaek Lim commented on SPARK-27804:
--------------------------------------
Did you encounter this actually? The reason why I ask it is, the method is guided with synchronized so should not be happen.
> LiveListenerBus#addToQueue : create multiple AsyncEventQueues under race condition
> ----------------------------------------------------------------------------------
>
> Key: SPARK-27804
> URL: https://issues.apache.org/jira/browse/SPARK-27804
> Project: Spark
> Issue Type: Bug
> Components: Spark Core
> Affects Versions: 2.4.3
> Reporter: duyu
> Priority: Major
>
> LiveListenerBus.scala
> {code}
> private[spark] def addToQueue(
> listener: SparkListenerInterface,
> queue: String): Unit = synchronized {
> if (stopped.get()) {
> throw new IllegalStateException("LiveListenerBus is stopped.")
> }
> queues.asScala.find(_.name == queue) match {
> case Some(queue) =>
> queue.addListener(listener)
> case None =>
> // it will create multiple AsyncEventQueues with the same name when run in multi-thread scene and those created AsyncEventQueues will be added to queues
> val newQueue = new AsyncEventQueue(queue, conf, metrics, this)
> newQueue.addListener(listener)
> if (started.get()) {
> newQueue.start(sparkContext)
> }
> queues.add(newQueue)
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org