mridulm commented on a change in pull request #35146:
URL: https://github.com/apache/spark/pull/35146#discussion_r780917113



##########
File path: 
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java
##########
@@ -829,8 +830,8 @@ public void onData(String streamId, ByteBuffer buf) throws 
IOException {
       // memory, while still providing the necessary guarantee.
       synchronized (partitionInfo) {
         AppShuffleMergePartitionsInfo info = 
appShuffleInfo.shuffles.get(partitionInfo.shuffleId);
-        if (isStale(info, partitionInfo.shuffleMergeId) ||
-            isTooLate(info, partitionInfo.reduceId)) {
+        if (isTooLate(info, partitionInfo.reduceId) ||
+            isStale(info, partitionInfo.shuffleMergeId)) {

Review comment:
       Now that you have fixed the issue, checking `isStale` first is better: 
it is cheaper check to do first.




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