Jungtaek Lim created SPARK-31951:
------------------------------------

             Summary: Explicitly close iterator in KVStoreView
                 Key: SPARK-31951
                 URL: https://issues.apache.org/jira/browse/SPARK-31951
             Project: Spark
          Issue Type: Improvement
          Components: Spark Core
    Affects Versions: 3.1.0
            Reporter: Jungtaek Lim


While reviewing SPARK-31929 we realized there're places which retrieve 
KVStoreView and leverage it but don't close the underlying iterator not knowing 
that it's actually closeable.

The culprit is that KVStoreView implements Iterable and hides the fact that it 
should be closed. The only way to close the underlying iterator properly is 
calling closeableIterator to get underlying iterator.

I think this is the way to go; force caller to call closeableIterator and let 
caller deal with underlying iterator with responsibility to close the iterator.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to