LuciferYang commented on code in PR #43502:
URL: https://github.com/apache/spark/pull/43502#discussion_r1395081107
##########
common/kvstore/src/main/java/org/apache/spark/util/kvstore/LevelDBIterator.java:
##########
@@ -182,23 +193,34 @@ public boolean skip(long n) {
@Override
public synchronized void close() throws IOException {
- db.notifyIteratorClosed(this);
+ db.notifyIteratorClosed(it);
if (!closed) {
- it.close();
- closed = true;
- next = null;
+ try {
+ it.close();
+ } finally {
+ closed = true;
+ next = null;
+ cancelResourceClean();
Review Comment:
Yes, we have discussed this issue. The reason for not directly calling
`this.cleaner.clean()` is because the close process in `Cleaner` has added the
operation of `synchronized (this._db)`, which is slightly different from the
semantics of the original `close()` method. For specific discussions, please
refer to this thread:
https://github.com/apache/spark/pull/43502#discussion_r1372954706
--
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]