Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1597

PathRetractionStrategy messing up certain traversals

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.3.0
    • process
    • None

    Description

      There are certain types of traversals that do not work when PathRetractionStrategy is included. This ticket discusses one specific case that is only reproducible in 3.3.0-SNAPSHOT / current master/.

      Here's the traversal and the expected result:

      gremlin> g.withoutStrategies(PathRetractionStrategy).V(1,2).as("a").optional(bothE().dedup().as("b")).choose(select("b").select("a","b")., project("a").by(select("a")))
      ==>[a:v[2]]
      ==>[a:v[1],b:e[9][1-created->3]]
      ==>[a:v[1],b:e[7][1-knows->2]]
      ==>[a:v[1],b:e[8][1-knows->4]]
      

      With PathRetractionStrategy included we get:

      gremlin> g.V(1,2).as("a").optional(bothE().dedup().as("b")).choose(select("b"), select("a","b"), project("a").by(select("a")))
      ==>[a:v[2]]
      

      What's interesting is, that the following 2 traversals compile to the same final traversal (according to .explain()):

      g.withoutStrategies(PathRetractionStrategy).V(1,2).as("a").optional(bothE().dedup().as("b")).choose(select("b").barrier(2500), select("a","b").barrier(2500), project("a").by(select("a").barrier(2500)))
      g.V(1,2).as("a").optional(bothE().dedup().as("b")).choose(select("b"), select("a","b"), project("a").by(select("a")))
      

      ...but the one w/ PathRetractionStrategy still returns the wrong result, while the other traversal returns the expected result.

      Attachments

        Activity

          People

            twilmes Ted Wilmes
            dkuppitz Daniel Kuppitz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: