[ 
https://issues.apache.org/jira/browse/TINKERPOP-2365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17097485#comment-17097485
 ] 

ASF GitHub Bot commented on TINKERPOP-2365:
-------------------------------------------

spmallette opened a new pull request #1283:
URL: https://github.com/apache/tinkerpop/pull/1283


   https://issues.apache.org/jira/browse/TINKERPOP-2365
   
   LazyBarrierStrategy was improperly adding a barrier step to the end of a 
traversal when profile() was called. This wasn't noticeable in testing because 
of an overly zealous choice to disable the strategy in testing if profile() was 
present. Modified the strategy to more properly handle this situation and to 
limit the removal of LazyBarrierStrategy to ProfileTest only.
   
   All tests pass with `docker/build.sh -t -n -i`
   
   VOTE +1


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


> LazyBarrierStrategy adds a NoOpBarrierStep when profile() is present
> --------------------------------------------------------------------
>
>                 Key: TINKERPOP-2365
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2365
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.3.10
>            Reporter: Stephen Mallette
>            Priority: Minor
>
> Not sure if this needs to behave like this for any particular reason but:
> {code}
> gremlin> g.V().both().profile()
> ==>Traversal Metrics
> Step                                                               Count  
> Traversers       Time (ms)    % Dur
> =============================================================================================================
> TinkerGraphStep(vertex,[])                                             1      
>      1           0.055    67.30
> VertexStep(BOTH,vertex)                                                2      
>      2           0.012    15.51
> NoOpBarrierStep(2500)                                                  2      
>      1           0.014    17.19
>                                             >TOTAL                     -      
>      -           0.082        -
> {code}
> the {{NoOpBarrierStep}} doesn't get added unless {{profile()}} is present as 
> shown in this {{explain()}}:
> {code}
> gremlin> g.V().both().explain()
> ==>Traversal Explanation
> ========================================================================================
> Original Traversal                 [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> ConnectiveStrategy           [D]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> MatchPredicateStrategy       [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> EarlyLimitStrategy           [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> FilterRankingStrategy        [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> InlineFilterStrategy         [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> IncidentToAdjacentStrategy   [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> AdjacentToIncidentStrategy   [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> RepeatUnrollStrategy         [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> CountStrategy                [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> PathRetractionStrategy       [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> LazyBarrierStrategy          [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> TinkerGraphCountStrategy     [P]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> TinkerGraphStepStrategy      [P]   [TinkerGraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> ProfileStrategy              [F]   [TinkerGraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> StandardVerificationStrategy [V]   [TinkerGraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> Final Traversal                    [TinkerGraphStep(vertex,[]), 
> VertexStep(BOTH,vertex)]
> {code}
> unless of course we {{explain()}} the {{profile()}} which seems weird:
> {code}
> gremlin> g.V().both().profile().explain()
> ==>Traversal Explanation
> ==========================================================================================================================================================================================================
> Original Traversal                 [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex), ProfileSideEffectStep, SideEffectCapStep([~metrics])]
> ConnectiveStrategy           [D]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex), ProfileSideEffectStep, SideEffectCapStep([~metrics])]
> MatchPredicateStrategy       [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex), ProfileSideEffectStep, SideEffectCapStep([~metrics])]
> EarlyLimitStrategy           [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex), ProfileSideEffectStep, SideEffectCapStep([~metrics])]
> FilterRankingStrategy        [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex), ProfileSideEffectStep, SideEffectCapStep([~metrics])]
> InlineFilterStrategy         [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex), ProfileSideEffectStep, SideEffectCapStep([~metrics])]
> IncidentToAdjacentStrategy   [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex), ProfileSideEffectStep, SideEffectCapStep([~metrics])]
> AdjacentToIncidentStrategy   [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex), ProfileSideEffectStep, SideEffectCapStep([~metrics])]
> RepeatUnrollStrategy         [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex), ProfileSideEffectStep, SideEffectCapStep([~metrics])]
> CountStrategy                [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex), ProfileSideEffectStep, SideEffectCapStep([~metrics])]
> PathRetractionStrategy       [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex), ProfileSideEffectStep, SideEffectCapStep([~metrics])]
> LazyBarrierStrategy          [O]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex), NoOpBarrierStep(2500), ProfileSideEffectStep, 
> SideEffectCapStep([~metrics])]
> TinkerGraphCountStrategy     [P]   [GraphStep(vertex,[]), 
> VertexStep(BOTH,vertex), NoOpBarrierStep(2500), ProfileSideEffectStep, 
> SideEffectCapStep([~metrics])]
> TinkerGraphStepStrategy      [P]   [TinkerGraphStep(vertex,[]), 
> VertexStep(BOTH,vertex), NoOpBarrierStep(2500), ProfileSideEffectStep, 
> SideEffectCapStep([~metrics])]
> ProfileStrategy              [F]   [TinkerGraphStep(vertex,[]), ProfileStep, 
> VertexStep(BOTH,vertex), ProfileStep, NoOpBarrierStep(2500), ProfileStep, 
> ProfileSideEffectStep, SideEffectCapStep([~metrics]
>                                       )]
> StandardVerificationStrategy [V]   [TinkerGraphStep(vertex,[]), ProfileStep, 
> VertexStep(BOTH,vertex), ProfileStep, NoOpBarrierStep(2500), ProfileStep, 
> ProfileSideEffectStep, SideEffectCapStep([~metrics]
>                                       )]
> Final Traversal                    [TinkerGraphStep(vertex,[]), ProfileStep, 
> VertexStep(BOTH,vertex), ProfileStep, NoOpBarrierStep(2500), ProfileStep, 
> ProfileSideEffectStep, SideEffectCapStep([~metrics]
>                                       )]
> {code}
> Seems like this is a bit of a bug in the sense that I would expect 
> {{explain()}} and {{profile()}} to examine the same working traversal up to 
> the point of that call.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to