LazyBarrierStrategy/NoOpBarrierStep incompatible with path-tracking
In this JanusGraph post (TreeStep and MultiQuery support), we were investigating if
TreeStep could be used jointly with bulked traversers so as to improve traversal time.Based on answers there, it looks like TinkerPop's
LazyBarrierStrategy explicitly excludes "path-tracking" traversals (https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/LazyBarrierStrategy.java#L85) and won't insert NoOpBarrierSteps in those cases, preventing us from bulking traversers.At a high level, I imagine this could be needed if traversers history was lost on bulking. Though, I'm not familiar enough with the code to be able to tell if this could concretely be a reason.
I have observed some "path-tracking" traversals (with
TreeStep) to run properly with bulking on JanusGraph (TreeStep and MultiQuery support). In addition, commenting out the check on TraverserRequirement.PATH (https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/LazyBarrierStrategy.java#L85) does not break gremlin-core unit tests locally.So my question is: would anyone have context on why "path-tracking" traversals can't use bulking? Is there any chance this exclusion could be scoped down to a subset of "path-tracking" traversals maybe?
Any pointer appreciated!