You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2021/08/03 18:23:54 UTC

[tinkerpop] 01/02: TINKERPOP-2585 Adjust strategy order for InlineFilterStrategy

This is an automated email from the ASF dual-hosted git repository.

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

commit 7c9db4341b35da6e8fc403d65e7c0ba032ca2546
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Fri Jul 2 16:29:11 2021 -0400

    TINKERPOP-2585 Adjust strategy order for InlineFilterStrategy
    
    The test associated with TINKERPOP-2585 in the JIRA wasn't easy to translate to something generalized for our test suite and what's more it was somewhat non-deterministic. Where it was failing for me consistently some time ago, as of today, I wasn't able to get it to fail and I dont think anything else changed on the way to it being fixed. When it was failing this extra bit of order definitely fixed the problem.
---
 CHANGELOG.asciidoc                                                     | 1 +
 .../process/traversal/strategy/optimization/InlineFilterStrategy.java  | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index e164845..f7de983 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -32,6 +32,7 @@ This release also includes changes from <<release-3-4-12, 3.4.12>>.
 
 * Added support for `g.tx()` in Javascript.
 * Fixed bug in Javascript error message related to validating anonymous traversal spawns.
+* Ensured `PathRetractionStrategy` is applied after `InlineFilterStrategy` which prevents an error in traverser mapping in certain conditions.
 * Changed close of Python and Javascript connections to no longer send a "close message" as the server no longer acknowledges it as of 3.5.0.
 * Fixed bug where the `Graph` instance was not being assigned to child traversals.
 * Removed sending of deprecated session close message from Gremlin.Net driver.
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategy.java
index bec170d..41d6f01 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategy.java
@@ -74,7 +74,8 @@ public final class InlineFilterStrategy extends AbstractTraversalStrategy<Traver
     private static final InlineFilterStrategy INSTANCE = new InlineFilterStrategy();
     private static final Set<Class<? extends OptimizationStrategy>> POSTS = new HashSet<>(Arrays.asList(
             GraphFilterStrategy.class,
-            AdjacentToIncidentStrategy.class));
+            AdjacentToIncidentStrategy.class,
+            PathRetractionStrategy.class));
     private static final Set<Class<? extends OptimizationStrategy>> PRIORS = new HashSet<>(Arrays.asList(
             FilterRankingStrategy.class,
             IdentityRemovalStrategy.class,