rickyma commented on code in PR #1914:
URL: 
https://github.com/apache/incubator-uniffle/pull/1914#discussion_r1680468893


##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/writer/RssShuffleWriter.java:
##########
@@ -513,23 +513,32 @@ private void checkDataIfAnyFailure() {
     if (blockFailSentRetryEnabled) {
       collectFailedBlocksToResend();
     } else {
-      if (hasAnyBlockFailure()) {
-        throw new RssSendFailedException("Fail to send the block");
+      String errorMsg = getFirstBlockFailure();
+      if (errorMsg != null) {
+        throw new RssSendFailedException("Fail to send the block. Error: " + 
errorMsg);
       }
     }
   }
 
-  private boolean hasAnyBlockFailure() {
+  private String getFirstBlockFailure() {
     Set<Long> failedBlockIds = shuffleManager.getFailedBlockIds(taskId);
     if (!failedBlockIds.isEmpty()) {
+      List<TrackingBlockStatus> trackingBlockStatues =
+          shuffleManager
+              .getBlockIdsFailedSendTracker(taskId)
+              .getFailedBlockStatus(failedBlockIds.iterator().next());
+      String errorMsg = "Default Error Message";

Review Comment:
   Could we use a static final variable to replace this?



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