GitHub user mpollmeier opened a pull request:
https://github.com/apache/tinkerpop/pull/745
TINKERPOP-1830: fix race condition in TinkerIndex
My colleage @fabsx00 discovered a race condition in tinkergraph's index
creation. He fixed it by simply replacing `parallelStream` with `stream`.
Quoting his analysis:
> So, reading the code, you see that this.put is called in parallel, but
that method seems to contain a race as get is called on the index, checked for
null, and a subsequent write is performed. It still seems like using stream
here fixes the problem we've been seeing, and the performance hit is not
significant.
Ticket: https://issues.apache.org/jira/browse/TINKERPOP-1830
After initial feedback I can backport this onto tp32.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mpollmeier/tinkerpop
mp/1830-tinkergraph-index-race-condition
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/745.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #745
----
commit ca5aa798093b58833bf54d7a495a0928bca41555
Author: Fabian Yamaguchi <[email protected]>
Date: 2017-10-27T16:43:15Z
patch for TinkerIndex
----
---