You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Kousuke Saruta (Jira)" <ji...@apache.org> on 2021/11/13 17:55:00 UTC

[jira] [Updated] (SPARK-37315) Mitigate ConcurrentModificationException thrown from a test in MLEventSuite

     [ https://issues.apache.org/jira/browse/SPARK-37315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kousuke Saruta updated SPARK-37315:
-----------------------------------
    Summary: Mitigate ConcurrentModificationException thrown from a test in MLEventSuite  (was: Mitigate a ConcurrentModificationException thrown from a test in MLEventSuite)

> Mitigate ConcurrentModificationException thrown from a test in MLEventSuite
> ---------------------------------------------------------------------------
>
>                 Key: SPARK-37315
>                 URL: https://issues.apache.org/jira/browse/SPARK-37315
>             Project: Spark
>          Issue Type: Bug
>          Components: ML, Tests
>    Affects Versions: 3.3.0
>            Reporter: Kousuke Saruta
>            Assignee: Kousuke Saruta
>            Priority: Major
>
> Recently, I notice ConcurrentModificationException is sometimes thrown from the following part of the test "pipeline read/write events" in MLEventSuite when Scala 2.13 is used.
> {code}
> events.map(JsonProtocol.sparkEventToJson).foreach { event =>
>   assert(JsonProtocol.sparkEventFromJson(event).isInstanceOf[MLEvent])
> }
> {code}
> I think the root cause is the ArrayBuffer (events) is updated asynchronously by the following part.
> {code}
> private val listener: SparkListener = new SparkListener {
>   override def onOtherEvent(event: SparkListenerEvent): Unit = event match {
>     case e: MLEvent => events.append(e)
>     case _ =>
>   }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org