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

Bryn Cooke commented on TINKERPOP3-667:
---------------------------------------

Hi Marko,
I simply add another strategy with an applyPost or applyPrior and observe that 
the strategies are not sorted correctly.

This is actually my be difficult to reproduce consistently, but I believe that 
the root of it is that the sorting mechanism is broken because you can have a 
situation where:

A<B
A=C
B=C

I imagine that any sort other than bubble will have difficulty with this.

Here is an example that uses top-sort that seems to work: 
https://github.com/BrynCooke/incubator-tinkerpop/commit/2921c664153fe7ac5239b8ec91072c0b1a493d20

traversal category is not considered and I'm not sure if it is a good idea 
anyway, the semantics are unclear.


> Strategy sorting doesn't work
> -----------------------------
>
>                 Key: TINKERPOP3-667
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-667
>             Project: TinkerPop 3
>          Issue Type: Bug
>          Components: process
>            Reporter: Bryn Cooke
>
> I've been trying to get a strategy to precede another strategy using the 
> applyPrior mechanism.
> The dependency map looks good at:
> https://github.com/apache/incubator-tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java#L131
> but the sort doesn't seem to work.
> I suspect this is something to do with merge sort being used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to