anishshri-db commented on code in PR #56234:
URL: https://github.com/apache/spark/pull/56234#discussion_r3338541008


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/RocksDBSuite.scala:
##########
@@ -3276,6 +3276,36 @@ class RocksDBSuite extends AlsoTestWithRocksDBFeatures 
with SharedSparkSession
     }
   }
 
+  testWithColumnFamilies(
+    "SPARK-57183: LRUCache is closed on RocksDB.close() in unbounded memory 
mode",
+    TestWithBothChangelogCheckpointingEnabledAndDisabled) { colFamiliesEnabled 
=>
+    // In unbounded mode each RocksDB instance owns its LRUCache. Verify that 
close() releases
+    // the native handle so that the cache object is no longer valid after 
close.
+    withTempDir { dir =>
+      try {
+        val sqlConf = new SQLConf
+        sqlConf.setConfString(
+          RocksDBConf.ROCKSDB_SQL_CONF_NAME_PREFIX + "." +
+            RocksDBConf.BOUNDED_MEMORY_USAGE_CONF_KEY, "false")

Review Comment:
   Oh can we combine the code into a single function/test - and just do a 
conditional check based on the value passed for `boundedMemoryUsageEnabled` ? 
that way - we don't need to duplicate the code and can mostly reuse it



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

Reply via email to