HeartSaVioR edited a comment on pull request #28769: URL: https://github.com/apache/spark/pull/28769#issuecomment-641700315
Oh OK. Sorry I missed. At least we close it properly when calling `closeableIterator()`, but still in question for using KVStoreView directly. If we are confident on guaranteeing that we close the iterator in any case, `finalize` method would be just redundant. Instead, finalize method is there with excuse. https://github.com/apache/spark/blob/f3771c6b47d0b3aef10b86586289a1f675c7cfe2/common/kvstore/src/main/java/org/apache/spark/util/kvstore/LevelDBIterator.java#L194-L203 Here "eventually" would matter (it could be after DB is closed, as the semantic of eventually), and in reality it is even not guaranteed to be called. We know why it's deprecated in Java 9. If the method should be there to do something then we are missing something. ---------------------------------------------------------------- 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]
