You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2019/05/22 05:50:31 UTC

[GitHub] [tinkerpop] divijvaidya opened a new pull request #1118: TINKERPOP-2224 Detect and fix iterator leaks

divijvaidya opened a new pull request #1118: TINKERPOP-2224 Detect and fix iterator leaks
URL: https://github.com/apache/tinkerpop/pull/1118
 
 
   https://issues.apache.org/jira/browse/TINKERPOP-2224
   
   ## Motivation
   During the execution of the query the underlying provider layer might open some resources such as cursors or iterators which should be closed on completion of execution of the query. This is largely done by calling Traversal.close() method at the end of the traversal.
   However, there are bugs in the query processor which lead to a leak of these resources. 
   
   As an example, consider the following query:
   
   `g.V().not(__.V().out()).fold().unfold()`
   
   The implementation of not() step creates a child traversal which would open an iterator(aka resource) at the storage layer but due to a bug in TraversalUtil.java, it will never close this traversal (even on calling Traversal.close() on the global Traversal). This leads to open resources on the storage layer.
   
   The purpose of this task is to add a framework for detecting an iterator leak and consequently fixing the bugs unearthed by the new framework.
   
   ## Changes
   1. Add a framework to the existing test suite which would detect iterator leak during execution of every query in the test suite.
   2. Fix the bugs causing iterator leak at multiple places
   3. Provide an annotation to skip check for iterator leak which require fixing. To be taken up as a separate task.
   
   ## Testing
   - After adding the new assertion, the existing test cases fail and after fixing the bugs, they pass.
   - gremlin-core: mvn clean install -DskipIntegrationTests=fals
   - gremlin-test: mvn clean install -DskipIntegrationTests=fals
   - tinkergraph-gremlin: mvn clean install -DskipIntegrationTests=fals
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services