otterc commented on code in PR #39725:
URL: https://github.com/apache/spark/pull/39725#discussion_r1086008666
##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java:
##########
@@ -1382,6 +1395,7 @@ public void onData(String streamId, ByteBuffer buf)
throws IOException {
freeDeferredBufs();
if (isTooLateBlockPush) {
mergeManager.pushMergeMetrics.lateBlockPushes.mark();
+ mergeManager.pushMergeMetrics.ignoredBlockBytes.mark(buf.limit());
Review Comment:
should be` buf.remaining()`
##########
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java:
##########
@@ -1356,6 +1357,18 @@ private boolean isTooLate(
!appShuffleMergePartitionsInfo.shuffleMergePartitions.containsKey(reduceId);
}
+ /**
+ * For the block bytes in the deferred buffers that are ignored, capture
them
+ * and update pushMergeMetrics's ignoredBlockBytes.
+ */
+ private void updateIgnoredBytesWithDeferredBufs() {
+ if (deferredBufs != null && !deferredBufs.isEmpty()) {
+ for (ByteBuffer buf : deferredBufs) {
+
mergeManager.pushMergeMetrics.ignoredBlockBytes.mark(buf.remaining());
Review Comment:
I made a mistake with the earlier comment. For deferredBufs, we can use
`buf.limit`.
--
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]