srowen commented on a change in pull request #28769:
URL: https://github.com/apache/spark/pull/28769#discussion_r438971419



##########
File path: 
common/kvstore/src/main/java/org/apache/spark/util/kvstore/LevelDBIterator.java
##########
@@ -189,17 +189,7 @@ public synchronized void close() throws IOException {
       it.close();
       closed = true;
     }
-  }
-
-  /**
-   * Because it's tricky to expose closeable iterators through many internal 
APIs, especially
-   * when Scala wrappers are used, this makes sure that, hopefully, the JNI 
resources held by
-   * the iterator will eventually be released.
-   */
-  @SuppressWarnings("deprecation")
-  @Override
-  protected void finalize() throws Throwable {

Review comment:
       Why remove this? It may help clean up leaked iterators, though it's not 
by itself the mechanism to rely on.




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