prakharjain09 commented on a change in pull request #28482:
URL: https://github.com/apache/spark/pull/28482#discussion_r425325014



##########
File path: core/src/main/scala/org/apache/spark/storage/BlockManager.scala
##########
@@ -1829,7 +1901,63 @@ private[spark] class BlockManager(
     data.dispose()
   }
 
+  /**
+   * Class to handle block manager decommissioning retries
+   * It creates a Thread to retry offloading all RDD cache blocks
+   */
+  private class BlockManagerDecommissionManager(conf: SparkConf) {
+    @volatile private var stopped = false
+    private val sleepInterval = conf.get(
+      config.STORAGE_DECOMMISSION_REPLICATION_REATTEMPT_INTERVAL)
+
+    private val blockReplicationThread = new Thread {
+      override def run(): Unit = {
+        var failures = 0
+        try {
+          while (blockManagerDecommissioning &&
+            !stopped &&
+            !Thread.interrupted() &&
+            failures < 20) {
+            logDebug("Attempting to replicate all cached RDD blocks")
+            try {
+              decommissionRddCacheBlocks()
+            } catch {
+              case e: InterruptedException =>

Review comment:
       Can this explicit catching of InterruptedException `case e: 
InterruptedException =>` be removed? InterruptException will not be caught by 
`case NonFatal(t)` here so it will automatically be thrown back?




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

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