Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-46547][SS] Swallow non-fatal exception in maintenance task to avoid deadlock between maintenance thread and streaming aggregation operator #44542

Closed
wants to merge 7 commits into from
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,15 @@ private[sql] class RocksDBStateStoreProvider
}

override def doMaintenance(): Unit = {
rocksDB.doMaintenance()
try {
rocksDB.doMaintenance()
} catch {
// SPARK-46547 - Swallow non-fatal exception in maintenance task to avoid deadlock between
// maintenance thread and streaming aggregation operator
case NonFatal(ex) =>
logWarning(s"Ignoring error while performing maintenance operations with exception=",
ex)
}
}

override def close(): Unit = {
Expand Down