You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Andrea Child (Jira)" <ji...@apache.org> on 2025/09/26 20:47:00 UTC

[jira] [Assigned] (TINKERPOP-3192) RepeatUnrollStrategy can modify traversal semantics

     [ https://issues.apache.org/jira/browse/TINKERPOP-3192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Child reassigned TINKERPOP-3192:
---------------------------------------

    Assignee: Andrea Child

> 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
>            Assignee: Andrea Child
>            Priority: Major
>              Labels: breaking
>
> 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)