[
https://issues.apache.org/jira/browse/TINKERPOP-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15837838#comment-15837838
]
ASF GitHub Bot commented on TINKERPOP-1583:
-------------------------------------------
GitHub user twilmes opened a pull request:
https://github.com/apache/tinkerpop/pull/546
TINKERPOP-1583: PathRetractionStrategy retracts keys that are actually
needed
`PathRetractionStrategy` was not pushing `keepLabels` down into sibling
traversals of children with label requirements. Labels were also not being
pushed down into `TraversalParents` earlier in the traversal.
@okram I saw you had a `PathRetractionStrategy` issue while doing some
other work. Do you have a traversal you were getting a failure on? I can make
sure this fixes it and adds a test case if so.
`./docker/build.sh -t -i` success
```
[INFO] Apache TinkerPop .................................. SUCCESS [30.949s]
[INFO] Apache TinkerPop :: Gremlin Shaded ................ SUCCESS [9.462s]
[INFO] Apache TinkerPop :: Gremlin Core .................. SUCCESS [56.670s]
[INFO] Apache TinkerPop :: Gremlin Test .................. SUCCESS [4.887s]
[INFO] Apache TinkerPop :: Gremlin Groovy ................ SUCCESS
[2:09.535s]
[INFO] Apache TinkerPop :: Gremlin Groovy Test ........... SUCCESS [4.935s]
[INFO] Apache TinkerPop :: TinkerGraph Gremlin ........... SUCCESS
[3:32.013s]
[INFO] Apache TinkerPop :: Gremlin Benchmark ............. SUCCESS
[32:23.091s]
[INFO] Apache TinkerPop :: Gremlin Driver ................ SUCCESS
[15:56.763s]
[INFO] Apache TinkerPop :: Neo4j Gremlin ................. SUCCESS
[15:53.728s]
[INFO] Apache TinkerPop :: Gremlin Server ................ SUCCESS
[30:15.950s]
[INFO] Apache TinkerPop :: Gremlin Python ................ SUCCESS
[32:02.364s]
[INFO] Apache TinkerPop :: Hadoop Gremlin ................ SUCCESS
[22:03.412s]
[INFO] Apache TinkerPop :: Spark Gremlin ................. SUCCESS
[52:17.578s]
[INFO] Apache TinkerPop :: Giraph Gremlin ................ SUCCESS
[2:52:20.792s]
[INFO] Apache TinkerPop :: Gremlin Console ............... SUCCESS
[32:59.765s]
[INFO] Apache TinkerPop :: Gremlin Archetype ............. SUCCESS [0.085s]
[INFO] Apache TinkerPop :: Archetype - TinkerGraph ....... SUCCESS
[16:05.156s]
[INFO] Apache TinkerPop :: Archetype - Server ............ SUCCESS [10.964s]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
```
VOTE: +1
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1583
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/546.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 #546
----
commit da762dfee9b0ed05fd1185d80403e1be41873b58
Author: Ted Wilmes <[email protected]>
Date: 2017-01-24T20:57:07Z
Fixed a bug where keepLabels were not being pushed down into child
traversals by PathRetractionStrategy.
----
> PathRetractionStrategy retracts keys that are actually needed
> -------------------------------------------------------------
>
> Key: TINKERPOP-1583
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1583
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Affects Versions: 3.2.3
> Reporter: Geoff Reedy
> Assignee: Ted Wilmes
>
> We've seen this specifically for labels used in the until modulator of repeat
> but I suspect it happens for other modulators as well. Here's a test case:
> {code}
> graph = TinkerGraph.open()
> g = graph.traversal()
> g.addV().as("first").repeat(addE("next").to(addV()).inV()).times(5).addE("next").to(select("first")).iterate()
> g.V().limit(1).as('z').out().repeat(store('seen').out().where(without('seen'))).until(where(eq('z')))
> {code}
> complains there is no z-key
> I tired to fix it myself and submit a pull request but I found the
> implementation of PathRetractionStrategy confusing.
> One thing I noticed is that it seems the set of labels a step needs present
> in order to work properly is determined external to the steps and that code
> includes a lot of type-tests. If that logic were pushed down into the step
> implementations I think fixing the repeat case would be easier and it would
> be possible for extension steps to work properly with this strategy
> (currently it seems they can't because of the closed-world assumption
> inherent in the type-casing).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)