zhli1142015 commented on pull request #28769:
URL: https://github.com/apache/spark/pull/28769#issuecomment-641658022


   > In many spots in AppStatusStore, they call `view` but never explicitly 
call `close`. The implementation is focused on being concise, not concerning 
about the possible resource leak.
   > 
   > We don't even explicitly use our own Scala version of try-with-resource so 
implementing AutoCloseable doesn't help here, except the case it calls close 
explicitly. That said, most spots of AppStatusStore are simply leaking the 
iterator.
   
   yes, this is correct. 
   when these will be leaking iterators. This is only when AppstatusStore's 
close method is called (onUIDetached in 
"https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala";).
 in this method LevelDb is also closed, after that there is no chance to close 
these iterators even for GC.
   
   
   


----------------------------------------------------------------
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:
[email protected]



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

Reply via email to