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

LazyBarrierStrategy should not append an end barrier.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.5
    • Component/s: process
    • Labels:
      None

      Description

      gremlin> g.V().out().explain()
      ==>Traversal Explanation
      ==============================================================================================================
      Original Traversal                 [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
      
      ConnectiveStrategy           [D]   [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
      RangeByIsCountStrategy       [O]   [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
      RepeatUnrollStrategy         [O]   [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
      MatchPredicateStrategy       [O]   [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
      PathRetractionStrategy       [O]   [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
      IncidentToAdjacentStrategy   [O]   [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
      FilterRankingStrategy        [O]   [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
      InlineFilterStrategy         [O]   [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
      AdjacentToIncidentStrategy   [O]   [GraphStep(vertex,[]), VertexStep(OUT,vertex)]
      LazyBarrierStrategy          [O]   [GraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep(2500)]
      TinkerGraphCountStrategy     [P]   [GraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep(2500)]
      TinkerGraphStepStrategy      [P]   [TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep(2500)]
      ProfileStrategy              [F]   [TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep(2500)]
      StandardVerificationStrategy [V]   [TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep(2500)]
      
      Final Traversal                    [TinkerGraphStep(vertex,[]), VertexStep(OUT,vertex), NoOpBarrierStep(2500)]
      

      The only time this is cool is for RemoteTraversal because you want to barrier as much as you can to reduce over the wire costs. However, RemoteStrategy should append an end-barrier. No other strategy should do this — its just wasted clock cycles.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user okram opened a pull request:

          https://github.com/apache/tinkerpop/pull/559

          TINKERPOP-1627: LazyBarrierStrategy should not append an end barrier.

          https://issues.apache.org/jira/browse/TINKERPOP-1627

          You don't want `LazyBarrierStrategy` appending `NoOpBarriers` to the root traversal. It was doing that because I was trying to be clever and have it consider `RemoteTraversal` I/O (via bulking). Dumb. `RemoteStrategy` should be responsible for that concern. Fixed.

          VOTE +1.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/apache/tinkerpop TINKERPOP-1627

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/tinkerpop/pull/559.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #559


          commit 080306b099b3ca5dbf5bf5041447fd1a0557b9cb
          Author: Marko A. Rodriguez <okrammarko@gmail.com>
          Date: 2017-02-15T22:07:53Z

          Fixed an optimization bug in LazyBarrierStrategy. RemoteStrategy should be responsible for network I/O concerns (and using bulking as the optimization).


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user okram opened a pull request: https://github.com/apache/tinkerpop/pull/559 TINKERPOP-1627 : LazyBarrierStrategy should not append an end barrier. https://issues.apache.org/jira/browse/TINKERPOP-1627 You don't want `LazyBarrierStrategy` appending `NoOpBarriers` to the root traversal. It was doing that because I was trying to be clever and have it consider `RemoteTraversal` I/O (via bulking). Dumb. `RemoteStrategy` should be responsible for that concern. Fixed. VOTE +1. You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/tinkerpop TINKERPOP-1627 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tinkerpop/pull/559.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #559 commit 080306b099b3ca5dbf5bf5041447fd1a0557b9cb Author: Marko A. Rodriguez <okrammarko@gmail.com> Date: 2017-02-15T22:07:53Z Fixed an optimization bug in LazyBarrierStrategy. RemoteStrategy should be responsible for network I/O concerns (and using bulking as the optimization).
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user dkuppitz commented on the issue:

          https://github.com/apache/tinkerpop/pull/559

          `docker/build.sh -t -i` succeeded.

          VOTE: +1

          Show
          githubbot ASF GitHub Bot added a comment - Github user dkuppitz commented on the issue: https://github.com/apache/tinkerpop/pull/559 `docker/build.sh -t -i` succeeded. VOTE: +1
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user spmallette commented on the issue:

          https://github.com/apache/tinkerpop/pull/559

          All tests pass with `docker/build.sh -t -n -i`

          VOTE +1

          Show
          githubbot ASF GitHub Bot added a comment - Github user spmallette commented on the issue: https://github.com/apache/tinkerpop/pull/559 All tests pass with `docker/build.sh -t -n -i` VOTE +1
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/tinkerpop/pull/559

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tinkerpop/pull/559

            People

            • Assignee:
              okram Marko A. Rodriguez
              Reporter:
              okram Marko A. Rodriguez
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development