LuciferYang commented on code in PR #36467:
URL: https://github.com/apache/spark/pull/36467#discussion_r867443554
##########
common/kvstore/src/main/java/org/apache/spark/util/kvstore/RocksDB.java:
##########
@@ -418,6 +414,33 @@ private byte[] getTypeAlias(Class<?> klass) throws
Exception {
return alias;
}
+ private void stopCleanupThread() throws InterruptedException {
+ if (cleaningThread != null) {
+ stopped = true;
+ cleaningThread.join();
+ }
+ }
+
+ private void keepCleaning() {
+ boolean lastIsPresent = false;
Review Comment:
Added `lastIsPresent` to ensure all `RocksDBIterator`s dropped by GC are
closed , otherwise `testAllRocksDBIteratorNotExplicitClosed` will lead JVM
crash
##########
common/kvstore/src/main/java/org/apache/spark/util/kvstore/RocksDB.java:
##########
@@ -418,6 +414,33 @@ private byte[] getTypeAlias(Class<?> klass) throws
Exception {
return alias;
}
+ private void stopCleanupThread() throws InterruptedException {
+ if (cleaningThread != null) {
+ stopped = true;
+ cleaningThread.join();
+ }
+ }
+
+ private void keepCleaning() {
+ boolean lastIsPresent = false;
Review Comment:
Add `lastIsPresent` to ensure all `RocksDBIterator`s dropped by GC are
closed , otherwise `testAllRocksDBIteratorNotExplicitClosed` will lead JVM
crash
--
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]