rmcyang commented on code in PR #37638:
URL: https://github.com/apache/spark/pull/37638#discussion_r997751290


##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java:
##########
@@ -593,6 +607,9 @@ public void onData(String streamId, ByteBuffer buf) {
 
         @Override
         public void onComplete(String streamId) {
+          if (isTooLate) {
+            pushMergeMetrics.tooLateResponses.mark();
+          }

Review Comment:
   li-2.3.0 has the corresponding implementation as below:
   ```
   public void onComplete(String streamId) {
     if (isTooLate) {
       pushMergeMetrics.tooLateResponses.mark();
       // Throw an exception here so the block data is drained from channel and 
server
       // responds RpcFailure to the client.
       throw new RuntimeException(String.format("Block %s %s", msg.blockId,
         BlockPushException.TOO_LATE_MESSAGE_SUFFIX));
     }
     // For duplicate block that is received before the shuffle merge 
finalizes, the
     // server should respond success to the client.
   }
   ```
   I think the reason we are doing this only as part of `onComplete` is that we 
only mark tooLateResponse when all data from the stream has been received, and 
ignore those for the callbacks of `onData` and `onFailure`, correct? @otterc 



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