[
https://issues.apache.org/jira/browse/TINKERPOP-1529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15649850#comment-15649850
]
ASF GitHub Bot commented on TINKERPOP-1529:
-------------------------------------------
GitHub user dkuppitz opened a pull request:
https://github.com/apache/tinkerpop/pull/485
TINKERPOP-1529 LazyBarrierStrategy is too aggressive (variant 2)
https://issues.apache.org/jira/browse/TINKERPOP-1529
This fixes a long-term bug that was introduced when `LazyBarrierStrategy`
and `PathRetractionStrategy` started adding `NoOpBarrierSteps`. The bug
prevented a traversal from inspecting intermediate side-effect results produced
by non-barrier `SideEffectSteps` like `StoreStep`.
In contrast to https://github.com/apache/tinkerpop/pull/484 this PR extends
the `Traversal` interface (adds support for metadata) and solves the issue
using a new traversal strategy called `NoBarrierStrategy`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1529-variant2
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/485.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 #485
----
commit 9223f39068999026d17f9cd13a0442a5d90fb881
Author: Daniel Kuppitz <[email protected]>
Date: 2016-10-29T22:43:48Z
added failing store() test
commit 0a74d78ebf9fe040c8d3354a73ef6b195b2ed401
Author: Daniel Kuppitz <[email protected]>
Date: 2016-10-31T11:32:16Z
minor typo fix
commit 1409f631fda734a2bf46b37bc13d261d7e812880
Author: Daniel Kuppitz <[email protected]>
Date: 2016-10-31T11:33:09Z
Fixed LazyBarrierStrategy and PathRetractionStrategy (still wip)
commit 5a8be6b9f67de40a5c37d8f70be37faf36eb2bf2
Author: Daniel Kuppitz <[email protected]>
Date: 2016-11-09T05:05:20Z
Implemented NoBarrierStrategy
----
> LazyBarrierStrategy is too agressive
> ------------------------------------
>
> Key: TINKERPOP-1529
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1529
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Affects Versions: 3.2.3
> Reporter: Daniel Kuppitz
> Assignee: Daniel Kuppitz
>
> There are scenarios where {{LazyBarrierStrategy}} changes the semantics of a
> traversal:
> {noformat}
> gremlin> g = TinkerFactory.createModern().traversal()
> ==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
> gremlin> g.V().store("a").out().select("a")
> ==>[v[1],v[2],v[3],v[4],v[5],v[6]]
> ==>[v[1],v[2],v[3],v[4],v[5],v[6]]
> ==>[v[1],v[2],v[3],v[4],v[5],v[6]]
> ==>[v[1],v[2],v[3],v[4],v[5],v[6]]
> ==>[v[1],v[2],v[3],v[4],v[5],v[6]]
> ==>[v[1],v[2],v[3],v[4],v[5],v[6]]
> {noformat}
> This is actually not the result of {{store()}}, this is {{aggregate()}}. The
> expected result for {{store()}} would be:
> {noformat}
> ==>[v[1]]
> ==>[v[1]]
> ==>[v[1]]
> ==>[v[1],v[2],v[3],v[4]]
> ==>[v[1],v[2],v[3],v[4]]
> ==>[v[1],v[2],v[3],v[4],v[5],v[6]]
> {noformat}
> Another issue, which should probably go into another ticket, is this:
> {noformat}
> gremlin>
> g.withoutStrategies(LazyBarrierStrategy).V().store("a").out().select("a")
> ==>[v[1],v[2],v[3],v[4],v[5],v[6]]
> ==>[v[1],v[2],v[3],v[4],v[5],v[6]]
> ==>[v[1],v[2],v[3],v[4],v[5],v[6]]
> {noformat}
> That's it, the console is hanging at this point. Looks like
> {{PathRetractionStrategy}} is the remaining troublemaker. With both
> strategies excluded, we get the expected result:
> {noformat}
> gremlin> g.withoutStrategies(LazyBarrierStrategy,
> PathRetractionStrategy).V().store("a").out().select("a")
> ==>[v[1]]
> ==>[v[1]]
> ==>[v[1]]
> ==>[v[1],v[2],v[3],v[4]]
> ==>[v[1],v[2],v[3],v[4]]
> ==>[v[1],v[2],v[3],v[4],v[5],v[6]]
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)