mridulm commented on code in PR #43409:
URL: https://github.com/apache/spark/pull/43409#discussion_r1363172153


##########
core/src/main/scala/org/apache/spark/storage/BlockManagerDecommissioner.scala:
##########
@@ -145,7 +145,15 @@ private[storage] class BlockManagerDecommissioner(
                     // Confirm peer is not the fallback BM ID because 
fallbackStorage would already
                     // have been used in the try-block above so there's no 
point trying again
                     && peer != FallbackStorage.FALLBACK_BLOCK_MANAGER_ID) {
-                  fallbackStorage.foreach(_.copy(shuffleBlockInfo, bm))
+                  try {
+                    fallbackStorage.foreach(_.copy(shuffleBlockInfo, bm))
+                  } catch {
+                    case e: FileNotFoundException =>
+                      logWarning("Skipping block $shuffleBlockInfo, block 
deleted.", e)

Review Comment:
   ```suggestion
                         logWarning(s"Skipping block $shuffleBlockInfo, block 
deleted.", e)
   ```



##########
core/src/main/scala/org/apache/spark/storage/BlockManagerDecommissioner.scala:
##########
@@ -203,7 +211,7 @@ private[storage] class BlockManagerDecommissioner(
   @volatile private var stopped = false
   @volatile private[storage] var stoppedRDD =
     !conf.get(config.STORAGE_DECOMMISSION_RDD_BLOCKS_ENABLED)
-  @volatile private var stoppedShuffle =
+  @volatile private[storage] var stoppedShuffle =

Review Comment:
   Instead of exposing the volatile boolean, add a method to expose the read 
only state.
   
   ```suggestion
     @volatile private var stoppedShuffle =
         !conf.get(config.STORAGE_DECOMMISSION_SHUFFLE_BLOCKS_ENABLED)
         
     private[storage] def isShuffleStopped: Boolean = stoppedShuffle
     
   ```



##########
core/src/main/scala/org/apache/spark/storage/BlockManagerDecommissioner.scala:
##########
@@ -145,7 +145,15 @@ private[storage] class BlockManagerDecommissioner(
                     // Confirm peer is not the fallback BM ID because 
fallbackStorage would already
                     // have been used in the try-block above so there's no 
point trying again
                     && peer != FallbackStorage.FALLBACK_BLOCK_MANAGER_ID) {
-                  fallbackStorage.foreach(_.copy(shuffleBlockInfo, bm))
+                  try {
+                    fallbackStorage.foreach(_.copy(shuffleBlockInfo, bm))
+                  } catch {
+                    case e: FileNotFoundException =>
+                      logWarning("Skipping block $shuffleBlockInfo, block 
deleted.", e)
+                    case NonFatal(e) =>
+                      logError(s"Fallback storage for $shuffleBlockInfo 
failed", e)
+                      keepRunning = false
+                  }

Review Comment:
   Drop this ? The existing `NonFatal` block at the end does this currently.



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