tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkupp...@apache.org
Subject [tinkerpop] 01/01: TINKERPOP-2126 Made `TraverserSet` internals thread-safe
Date Fri, 04 Jan 2019 21:19:42 GMT
This is an automated email from the ASF dual-hosted git repository.

dkuppitz pushed a commit to branch TINKERPOP-2126
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit a4b47b4d7911a4ab68c3865bcd352ff722edd78b
Author: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
AuthorDate: Fri Jan 4 13:38:08 2019 -0700

    TINKERPOP-2126 Made `TraverserSet` internals thread-safe
---
 CHANGELOG.asciidoc                                                      | 1 +
 .../gremlin/process/traversal/traverser/util/TraverserSet.java          | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b4cf0a3..775366b 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -25,6 +25,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 This release also includes changes from <<release-3-2-11, 3.2.11>>.
 
+* Fixed a concurrency issue in `TraverserSet`
 * Fixed configuration and serialization of `SubgraphStrategy` which was missing the `checkAdjacentVertices`
flag.
 * Captured `TraversalInterruptionException` and converted to `TimeoutException` for `GremlinExecutor`.
 * Fixed a bug in `CoalesceStep` which squared the bulk if the step followed a `Barrier` step.
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/util/TraverserSet.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/util/TraverserSet.java
index 29f5f70..52bf4d8 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/util/TraverserSet.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/traverser/util/TraverserSet.java
@@ -40,7 +40,7 @@ import java.util.Spliterator;
  */
 public class TraverserSet<S> extends AbstractSet<Traverser.Admin<S>> implements
Set<Traverser.Admin<S>>, Queue<Traverser.Admin<S>>, Serializable {
 
-    private final Map<Traverser.Admin<S>, Traverser.Admin<S>> map = new
LinkedHashMap<>();
+    private final Map<Traverser.Admin<S>, Traverser.Admin<S>> map = Collections.synchronizedMap(new
LinkedHashMap<>());
 
     public TraverserSet() {
 


Mime
View raw message