Kousuke Saruta created SPARK-37315:
--------------------------------------
Summary: Mitigate a 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
Recently, I notice ConcurrentModificationException is 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: [email protected]
For additional commands, e-mail: [email protected]