You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Ken Hu (Jira)" <ji...@apache.org> on 2025/10/28 21:12:00 UTC

[jira] [Closed] (TINKERPOP-3201) Fix tail inside repeat

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

Ken Hu closed TINKERPOP-3201.
-----------------------------
    Resolution: Fixed

> Fix tail inside repeat
> ----------------------
>
>                 Key: TINKERPOP-3201
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3201
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.8.0
>            Reporter: Ken Hu
>            Priority: Major
>             Fix For: 3.8.0
>
>
> tail() step inside repeat() is not properly resetting per iteration.
> Consider the following queries on the modern graph on 3.7.x
> {code:java}
> gremlin> g.withoutStrategies(RepeatUnrollStrategy).V(1).repeat(__.both().order().tail(2)).times(2)
> ==>v[4]
> ==>v[6]
> {code}
> {code:java}
> gremlin> g.V(1).both().order().tail(2).both().order().tail(2)
> ==>v[5]
> ==>v[6]
> {code}
> The unrolled version doesn't match the repeat() version because tail() is recalculated on each call to processNextStart(). The tail() is being calculated too frequently even though there are still output traversers remaining from the previous calculation.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)