fold() or groupBy() you lose path history.ReducingBarrierStep: All of the traversers prior to the step are processed by a reduce function and once all the previous traversers are processed, a single "reduced value" traverser is emitted to the next step. Note that the path history leading up to a reducing barrier step is destroyed given its many-to-one nature.Once you are reduced to a single traverser from many traversers, that path sort of loses meaning. Often folks work around this by rewriting their traversal to use
aggregate() or some other global side-effect to hold the data somewhere other than path history. https://tinkerpop.apache.org/docs/current/reference/#a-note-on-barrier-steps