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

PathRetractionStrategy retracts keys that are actually needed

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.3
    • 3.2.4
    • process
    • None

    Description

      We've seen this specifically for labels used in the until modulator of repeat but I suspect it happens for other modulators as well. Here's a test case:

      graph = TinkerGraph.open()
      g = graph.traversal()
      g.addV().as("first").repeat(addE("next").to(addV()).inV()).times(5).addE("next").to(select("first")).iterate()
      g.V().limit(1).as('z').out().repeat(store('seen').out().where(without('seen'))).until(where(eq('z')))
      

      complains there is no z-key

      I tired to fix it myself and submit a pull request but I found the implementation of PathRetractionStrategy confusing.

      One thing I noticed is that it seems the set of labels a step needs present in order to work properly is determined external to the steps and that code includes a lot of type-tests. If that logic were pushed down into the step implementations I think fixing the repeat case would be easier and it would be possible for extension steps to work properly with this strategy (currently it seems they can't because of the closed-world assumption inherent in the type-casing).

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            twilmes Ted Wilmes
            gereedy Geoff Reedy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment