You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "otterc (via GitHub)" <gi...@apache.org> on 2023/01/24 21:37:23 UTC

[GitHub] [spark] otterc commented on a diff in pull request #39725: [SPARK-33573][FOLLOW-UP] Increment ignoredBlockBytes when shuffle push blocks are late or colliding

otterc commented on code in PR #39725:
URL: https://github.com/apache/spark/pull/39725#discussion_r1085930450


##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java:
##########
@@ -1356,6 +1356,17 @@ private boolean isTooLate(
         !appShuffleMergePartitionsInfo.shuffleMergePartitions.containsKey(reduceId);
     }
 
+    /**
+     * If necessary, look for the ignored bock bytes and capture them in pushMergeMetrics.
+     */
+    private void lookForIgnoredBlockBytesIfNecessary() {

Review Comment:
   nit: rename to `updatedIgnoreBytesWithDeferredBufs` or `deferredBufsIgnored` or something similar.



##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java:
##########
@@ -1393,6 +1405,7 @@ public void onData(String streamId, ByteBuffer buf) throws IOException {
           // the client in cases of duplicate even though no data is written.
           if (isDuplicateBlock()) {
             freeDeferredBufs();
+            mergeManager.pushMergeMetrics.ignoredBlockBytes.mark(buf.limit());
             return;
           }
           abortIfNecessary();

Review Comment:
   Even when the server aborts, it ignores the bytes.



##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java:
##########
@@ -1356,6 +1356,17 @@ private boolean isTooLate(
         !appShuffleMergePartitionsInfo.shuffleMergePartitions.containsKey(reduceId);
     }
 
+    /**
+     * If necessary, look for the ignored bock bytes and capture them in pushMergeMetrics.
+     */
+    private void lookForIgnoredBlockBytesIfNecessary() {
+      if (deferredBufs != null && !deferredBufs.isEmpty()) {
+        for (ByteBuffer buf : deferredBufs) {
+          mergeManager.pushMergeMetrics.ignoredBlockBytes.mark(buf.limit());

Review Comment:
   I think we should use `buf.remaining` here



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org