otterc commented on a change in pull request #33613:
URL: https://github.com/apache/spark/pull/33613#discussion_r681387486



##########
File path: core/src/main/scala/org/apache/spark/shuffle/ShuffleBlockPusher.scala
##########
@@ -78,10 +76,10 @@ private[spark] class ShuffleBlockPusher(conf: SparkConf) 
extends Logging {
         if (t.getCause != null && 
t.getCause.isInstanceOf[FileNotFoundException]) {
           return false
         }
-        val errorStackTraceString = Throwables.getStackTraceAsString(t)
         // If the block is too late or the invalid block push, there is no 
need to retry it
-        !errorStackTraceString.contains(
-          BlockPushErrorHandler.TOO_LATE_OR_STALE_BLOCK_PUSH_MESSAGE_SUFFIX)
+        val msg = t.getMessage
+        !(msg != null && msg.contains(
+          BlockPushErrorHandler.TOO_LATE_OR_STALE_BLOCK_PUSH_MESSAGE_SUFFIX))

Review comment:
       I think this  should check the message in the cause?  On the client 
side, the `RuntimeException` becomes the cause.
   See TransportClient.uploadStream
   ```
     RpcChannelListener listener = new RpcChannelListener(requestId, callback);
       channel.writeAndFlush(new UploadStream(requestId, meta, 
data)).addListener(listener);
   ```
      
   Here, RpcChannelListener wraps the exception with an IOException
    ```
       @Override
       void handleFailure(String errorMsg, Throwable cause) {
         handler.removeRpcRequest(rpcRequestId);
         callback.onFailure(new IOException(errorMsg, cause));
       }
   ```
   
   




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