spmallette commented on code in PR #3212: URL: https://github.com/apache/tinkerpop/pull/3212#discussion_r2375537407
########## docs/src/upgrade/release-3.8.x.asciidoc: ########## @@ -699,6 +699,93 @@ some of the interfaces in the gremlin traversal engine. This has led to several As of 3.8.0 `with()` modulation of the following steps will no longer work: `addV()`, `addE()`, `property()`, `drop()`, `mergeV()`, and `mergeE()`. +==== Stricter RepeatUnrollStrategy + +The `RepeatUnrollStrategy` has been updated to use a more conservative approach for determining which repeat traversals +are safe to unroll. Previously, the strategy would attempt to unroll most repeat loops. This caused unintentional +traversal semantic changes when some steps were unrolled (especially barrier steps). + +Now, the strategy only applies to repeat traversals that contain exclusively safe, well-understood steps: +`out()`, `in()`, `both()`, `inV()`, `outV()`, `otherV()`, `has(key, value)` + +Repeat traversals containing other steps will no longer be unrolled. There may be some performance differences for +traversals that previously benefited from automatic unrolling but the consistency of semantics outweighs the performance +impact. + +See: link:https://issues.apache.org/jira/browse/TINKERPOP-3192[TINKERPOP-3192] + +===== Examples of Affected Traversals ===== + +Usage of `limit()` inside `repeat()` is an example of a traversal that will no longer be unrolled. The following results +returned from the `modern` graph demonstrate the change of semantics if the `limit()` in `repeat()` were to be unrolled: + +[source,text] +---- +gremlin> g.V().both().limit(1).both().limit(1) +==>v[1] +gremlin> g.withoutStrategies(RepeatUnrollStrategy).V().repeat(both().limit()).times(2) +<<no results>> Review Comment: `<<no results>>` can just be represented as a new prompt line like `gremlin>` -- 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]
