[
https://issues.apache.org/jira/browse/TINKERPOP-2126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16738320#comment-16738320
]
ASF GitHub Bot commented on TINKERPOP-2126:
-------------------------------------------
dkuppitz commented on pull request #1035: TINKERPOP-2126 Made TraverserSet
internals thread-safe
URL: https://github.com/apache/tinkerpop/pull/1035
https://issues.apache.org/jira/browse/TINKERPOP-2126
This PR replaces the `LinkedHashMap` used by `TraverserSet` with a
`SynchronizedMap`. I haven't added a test case, cause I really don't know how
to consistently provoke a `ConcurrentModificationException`; however, a
`ConcurrentModificationException` did happen several times in a provider
implementation and it was caused by the `TraverserSet::toString()` method while
Spark was a) processing a query and b) concurrently logging the current state.
The way `TraverserSet::toString()` is implemented, it totally makes sense that
this scenario would sooner or later hit a `ConcurrentModificationException` if
we don't use a synchronized map.
`docker/build.sh -t -i` passed.
VOTE +1
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> TraverserSet's toString() is no thread-safe
> -------------------------------------------
>
> Key: TINKERPOP-2126
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2126
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Reporter: Daniel Kuppitz
> Assignee: Daniel Kuppitz
> Priority: Major
>
> {{TraverserSet::toString()}} is not thread-safe as it uses an iterator on the
> internal map, which could concurrently be modified (most likely in OLAP
> environments).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)