You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Stephen Mallette (Jira)" <ji...@apache.org> on 2020/07/28 11:28:00 UTC
[jira] [Updated] (TINKERPOP-2393) BranchStep should respect the
barrier size of BarrierStep when calling applyCurrentTraverser
[ https://issues.apache.org/jira/browse/TINKERPOP-2393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephen Mallette updated TINKERPOP-2393:
----------------------------------------
Summary: BranchStep should respect the barrier size of BarrierStep when calling applyCurrentTraverser (was: BranshStep should respect the barrier size of BarrierStep when calling applyCurrentTraverser)
> BranchStep should respect the barrier size of BarrierStep when calling applyCurrentTraverser
> --------------------------------------------------------------------------------------------
>
> Key: TINKERPOP-2393
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2393
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.4.7
> Reporter: redtree
> Priority: Minor
>
> Right now in BranchStep, if children contain a BarrierStep it keeps calling applyCurrentTraverser until this.starts is exhausted.
> [https://github.com/apache/tinkerpop/blob/534746b6019d0775e628375a3dfeba8a18df90fe/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/BranchStep.java#L139-L140]
> This means the child step may hold all upstream solutions in memory at once, and potentially memory usage is bloated.
> I think here we can change so that BarrierStep can have a method like getMaxBarrierSize, and BranchStep examines the size of barrier that child steps can handle at once then break the while loop either when `this.starts.hasNext` becomes false or we exceed the barrier size to save the potential memory consumption.
>
> When there are multiple barrier steps as children, we may pick either max or min among them.
> I am happy to implement this, but please let me know if you have any comments or concerns on this change.
> Thanks
--
This message was sent by Atlassian Jira
(v8.3.4#803005)