You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/05/07 02:28:15 UTC

[GitHub] [spark] cloud-fan commented on issue #24467: [SPARK-27568][CORE] Fix readLock leak while calling take()/first() on a cached rdd

cloud-fan commented on issue #24467: [SPARK-27568][CORE] Fix readLock leak while calling take()/first() on a cached rdd
URL: https://github.com/apache/spark/pull/24467#issuecomment-489882706
 
 
   This reminds me of the memory leak issue in sort-merge-join.
   
   We use scala `Iterator` to exchange data between SQL operators/RDDs, and we can only do the cleanup work when the `Iterator` is consumed up, or in a task completion listener.
   
   But what we really need is a traditional database iterator, with `open`, `next`, `get` and `close` methods. When a downstream operator finishes its work without consuming up the input data, it can call `close` to do free the resource.
   
   For this particular case, I think using a task completion listener is good enough?

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org