[
https://issues.apache.org/jira/browse/SPARK-20243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15960456#comment-15960456
]
Sean Owen commented on SPARK-20243:
-----------------------------------
Agree. I think this implementation should just synchronize access to a simple
mutable.HashMap. It's test-only and contention won't be significant as it's
only accessed when a stream is open.
> DebugFilesystem.assertNoOpenStreams thread race
> -----------------------------------------------
>
> Key: SPARK-20243
> URL: https://issues.apache.org/jira/browse/SPARK-20243
> Project: Spark
> Issue Type: Bug
> Components: Tests
> Affects Versions: 2.2.0
> Reporter: Bogdan Raducanu
>
> Introduced by SPARK-19946.
> DebugFilesystem.assertNoOpenStreams gets the size of the openStreams
> ConcurrentHashMap and then later, if the size was > 0, accesses the first
> element in openStreams.values. But, the ConcurrentHashMap might be cleared by
> another thread between getting its size and accessing it, resulting in an
> exception when trying to call .head on an empty collection.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]