LuciferYang commented on PR #36403: URL: https://github.com/apache/spark/pull/36403#issuecomment-1114905055
Change `WeakReference` in `iteratorTracker` to strong reference should avoid the issue I mentioned above, all `LevelDB/RockDBIterator` not explicitly closed in Spark code will be closed in `close` method of `LevelDB/RocksDB`(after [SPARK-38896](https://issues.apache.org/jira/browse/SPARK-38896) is merged, all `LevelDB/RockDBIterator` should have been explicitly closed in Spark code). The side effect of the above change is that `iteratorTracker` will no longer be affected by GC behavior. If the above changes are made, 'finalize()' is no longer meaningful because the a `LevelDB/RockDBIterator` instances entering the `Finalization ` process have already called the close method. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
