Andrea Child created TINKERPOP-3192:
---------------------------------------
Summary: RepeatUnrollStrategy can modify traversal semantics
Key: TINKERPOP-3192
URL: https://issues.apache.org/jira/browse/TINKERPOP-3192
Project: TinkerPop
Issue Type: Improvement
Components: process
Affects Versions: 3.7.4
Reporter: Andrea Child
Original dev list post:
[https://lists.apache.org/thread/9d8c0txw9znrottwj42b7gwsom80xybl]
It was found that the RepeatUnrollStrategy can modify traversal semantics when
it transforms a traversal with repeat into an unrolled traversal without
repeat. This is unintentional as the strategy was originally designed as a
performance optimization strategy.
Here is a simplified example of how the strategy can modify traversal semantics
using inject:
gremlin>
g.withStrategies(RepeatUnrollStrategy).inject(5,3,7).repeat(order()).times(1)
==>3
==>5
==>7
gremlin>
g.withoutStrategies(RepeatUnrollStrategy).inject(5,3,7).repeat(order()).times(1)
==>5
==>3
==>7
In addition to potentially modifying semantics, the strategy also hid problems
with certain steps (like order and other barrier steps) in repeat as the above
example shows an unexpected out of order result when the strategy is not
applied.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)