spmallette commented on code in PR #3241:
URL: https://github.com/apache/tinkerpop/pull/3241#discussion_r2445950337


##########
docs/src/upgrade/release-3.8.x.asciidoc:
##########
@@ -830,6 +843,46 @@ g.V().repeat(both()).times(2).dedup()
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-3192[TINKERPOP-3192]
 
+==== Modified limit() skip() range() Semantics in repeat()
+
+The semantics of globally-scoped `limit()`, `skip()`, and `range()` steps 
inside `repeat()` have been modified to ensure 
+consistent semantics across repeat iterations.Previously, these steps would 
track global counters, leading to unexpected 
+behavior where subsequent iterations of `limit()` and `range()` would filter 
all traversers as previous iterations 
+reached the global limits. In the case of `skip()`, traversers would be passed 
to subsequent iterations when they should 
+have been filtered. As of 3.8.0 the counters are tracked per iteration.
+
+[source,groovy]
+----
+// 3.7.4 - grateful dead graph examples producing no results due to global 
counters
+gremlin> 
g.withoutStrategies(RepeatUnrollStrategy).V().has('name','JAM').repeat(out('followedBy').limit(2)).times(2).values('name')
+gremlin>
+gremlin> 
g.withoutStrategies(RepeatUnrollStrategy).V().has('name','DRUMS').repeat(in('followedBy').range(1,3)).times(2).values('name')

Review Comment:
   interesting that `in` works anonymously. please change it to `__.in` though 
because it could be just a trick of Groovy/JVM that it's working now. i'm not 
sure we ever did anything to actually ensure it calls that properly.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to