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


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDB.scala:
##########
@@ -585,6 +673,8 @@ object RocksDBConf {
 
   // Configuration that specifies whether to compact the RocksDB data every 
time data is committed
   private val COMPACT_ON_COMMIT_CONF = SQLConfEntry("compactOnCommit", "false")
+  private val ENABLE_CHANGELOG_CHECKPOINTING_CONF = SQLConfEntry(
+    "enableChangelogCheckpointing", "false")

Review Comment:
   I wonder whether we want to just remove the entry from `SQLConf.scala` ? I 
don't think we have any of the other RocksDB config entries there. 
   
   Also, if you do want to keep this in both places, the string needs to be 
updated ?



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBFileManager.scala:
##########
@@ -717,6 +781,8 @@ object RocksDBImmutableFile {
 
   def isLogFile(fileName: String): Boolean = fileName.endsWith(".log")
 
+  def isDeltaFile(fileName: String): Boolean = fileName.endsWith(".changelog")

Review Comment:
   Are we not using `.delta` suffix intentionally here ? If so, can we add a 
comment for the same



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDB.scala:
##########
@@ -286,44 +322,49 @@ class RocksDB(
    */
   def commit(): Long = {
     val newVersion = loadedVersion + 1
-    val checkpointDir = createTempDir("checkpoint")
-    var rocksDBBackgroundThreadPaused = false
     try {
-      // Make sure the directory does not exist. Native RocksDB fails if the 
directory to
-      // checkpoint exists.
-      Utils.deleteRecursively(checkpointDir)
 
       logInfo(s"Flushing updates for $newVersion")
-      val flushTimeMs = timeTakenMs { db.flush(flushOptions) }
-
-      val compactTimeMs = if (conf.compactOnCommit) {

Review Comment:
   I'm not sure we can just get rid of this directly though. Maybe we can start 
the deprecation process, but we might need to keep supporting this for a while ?



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