You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2016/05/02 16:31:13 UTC

[jira] [Commented] (TINKERPOP-1281) Memory.HALTED_TRAVERSER transience is not sound.

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

Marko A. Rodriguez commented on TINKERPOP-1281:
-----------------------------------------------

So I understand what is happening now. Here is the deal.

1. `Memory.HALTED_TRAVERSERS` only exist when the master traversal yields halted traversals. That is, for example, when a traversal ends with a `Barrier`. As the result is not distributed across the graph, the vertices don't have `HALTED_TRAVERSERS` as a `VertexProperty`, but instead the master traversal stores it in `Memory`.

2. That `Memory.HALTED_TRAVERSERS` is not a side-effect and thus, doesn't get propagated to the next step.

I think we should have the concept of `ROOT_TRAVERSAL` and `HALTED_TRAVERSERS` as configurations that are passed to every `VertexProgram` in a multi-OLAP traversal chain. This way, `program()` will be able to see the traversal (if it needs it) and it will be able to get halted traversers, if it needs it.

> Memory.HALTED_TRAVERSER transience is not sound.
> ------------------------------------------------
>
>                 Key: TINKERPOP-1281
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1281
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.2.0-incubating
>            Reporter: Marko A. Rodriguez
>
> {code}
> g.V().out().program(xxx)
> {code}
> The above {{xxx}} VertexProgram will have access to the {{VertexProperty.HALTED_TRAVERSERS}} from {{out()}}.
> {code}
> g.V().out().groupCount().program(yyy)
> {code}
> The above {{yyy}} VertexProgram will not have access to the {{Memory.HALTED_TRAVERSERS}} from {{groupCount()}} (barrier) because it will be declared transient.
> ---------
> [10:32 AM] Marko Rodriguez: this.memoryComputeKeys.add(MemoryComputeKey.of(HALTED_TRAVERSERS, Operator.addAll, false, this.keepDistributedHaltedTraversers)); // only keep if it will be preserved
> [10:32 AM] Daniel Kuppitz: when is keepDistributedHaltedTraversers false?
> [10:33 AM] Marko Rodriguez:   this.keepDistributedHaltedTraversers =
>                 !(this.traversal.get().getParent().asStep().getNextStep() instanceof ComputerResultStep || // if its just going to stream it out, don't distribute
>                         this.traversal.get().getParent().asStep().getNextStep() instanceof EmptyStep ||  // same as above, but if using TraversalVertexProgramStep directly
>                         (this.traversal.get().getParent().asStep().getNextStep() instanceof ProfileStep && // same as above, but needed for profiling
>                                 this.traversal.get().getParent().asStep().getNextStep().getNextStep() instanceof ComputerResultStep));
> 		Show more
> 		given that ProgramVertexProgramStep is next, it will false and thus, Memory.HALTED_TRAVERSERS is transient and is erased.
> [10:34 AM] Marko Rodriguez: I think that is the problem.



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