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

LazyBarrierStrategy fully responsible for barrier() additions

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Done
    • 3.2.9
    • 3.5.0, 3.4.11
    • process
    • None

    Description

      As it stands, LazyBarrierStrategy, RepeatUnrollStrategy and PathRetractionStrategy (others??) add barrier() steps as needed - for example:

      gremlin> g.V().repeat(out().barrier()).times(2).explain()
      ==>Traversal Explanation
      ===============================================================================================================================================================================================
      Original Traversal                 [GraphStep(vertex,[]), RepeatStep([VertexStep(OUT,vertex), NoOpBarrierStep, RepeatEndStep],until(loops(2)),emit(false))]
      
      ConnectiveStrategy           [D]   [GraphStep(vertex,[]), RepeatStep([VertexStep(OUT,vertex), NoOpBarrierStep, RepeatEndStep],until(loops(2)),emit(false))]
      MatchPredicateStrategy       [O]   [GraphStep(vertex,[]), RepeatStep([VertexStep(OUT,vertex), NoOpBarrierStep, RepeatEndStep],until(loops(2)),emit(false))]
      FilterRankingStrategy        [O]   [GraphStep(vertex,[]), RepeatStep([VertexStep(OUT,vertex), NoOpBarrierStep, RepeatEndStep],until(loops(2)),emit(false))]
      InlineFilterStrategy         [O]   [GraphStep(vertex,[]), RepeatStep([VertexStep(OUT,vertex), NoOpBarrierStep, RepeatEndStep],until(loops(2)),emit(false))]
      IncidentToAdjacentStrategy   [O]   [GraphStep(vertex,[]), RepeatStep([VertexStep(OUT,vertex), NoOpBarrierStep, RepeatEndStep],until(loops(2)),emit(false))]
      RepeatUnrollStrategy         [O]   [GraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500)]
      PathRetractionStrategy       [O]   [GraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500)]
      AdjacentToIncidentStrategy   [O]   [GraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500)]
      CountStrategy                [O]   [GraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500)]
      LazyBarrierStrategy          [O]   [GraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500)]
      TinkerGraphCountStrategy     [P]   [GraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500)]
      TinkerGraphStepStrategy      [P]   [TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500)]
      ProfileStrategy              [F]   [TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500)]
      StandardVerificationStrategy [V]   [TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500)]
      
      Final Traversal                    [TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500), VertexStep(OUT,vertex), NoOpBarrierStep, NoOpBarrierStep(2500)]
      

      We should centralize the logic for this in LazyBarrierStrategy and remove it from other strategies. By keeping the logic in a single place we can (1) ensure the best implementation - note in the above example, we're getting extra barrier() steps (2) users can be assured that removing the single LazyBarrierStrategy will remove all automated barrier() applications.

      This isn't a breaking change, but it could change traversal behavior I suppose - perhaps this goes just to 3.4.0.......

      Attachments

        Issue Links

        Activity

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

          People

            spmallette Stephen Mallette
            spmallette Stephen Mallette
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment