Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package org.apache.spark.sql.execution.streaming.state

import java.io._

import scala.util.control.NonFatal

import org.apache.hadoop.conf.Configuration

import org.apache.spark.{SparkConf, SparkEnv}
Expand Down Expand Up @@ -233,7 +235,12 @@ private[sql] class RocksDBStateStoreProvider
}

override def doMaintenance(): Unit = {
rocksDB.doMaintenance()
try {
rocksDB.doMaintenance()
} catch {
case NonFatal(ex) =>
logWarning(s"Error performing maintenance operations with exception=$ex")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this to include full stacktrace logWarning("...", ex)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also make it explicit that this error is ignored in the log.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done - updated the PR

}
}

override def close(): Unit = {
Expand Down