This is an automated email from the ASF dual-hosted git repository.
zuston pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new 7781bf626 [#2520] fix(spark3): Shuffle write total duration is
incorrectly accumulated in event log (#2521)
7781bf626 is described below
commit 7781bf626c9762ece9b37eef71da58add364d021
Author: Junfan Zhang <[email protected]>
AuthorDate: Thu Jun 26 14:34:32 2025 +0800
[#2520] fix(spark3): Shuffle write total duration is incorrectly
accumulated in event log (#2521)
### What changes were proposed in this pull request?
Shuffle write total duration is incorrectly accumulated in event log
### Why are the changes needed?
fix #2520
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Needn't
---
.../main/java/org/apache/spark/shuffle/events/ShuffleWriteTimes.java | 1 -
.../main/java/org/apache/spark/shuffle/writer/WriteBufferManager.java | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git
a/client-spark/common/src/main/java/org/apache/spark/shuffle/events/ShuffleWriteTimes.java
b/client-spark/common/src/main/java/org/apache/spark/shuffle/events/ShuffleWriteTimes.java
index 0c12d04c8..67d60fdfd 100644
---
a/client-spark/common/src/main/java/org/apache/spark/shuffle/events/ShuffleWriteTimes.java
+++
b/client-spark/common/src/main/java/org/apache/spark/shuffle/events/ShuffleWriteTimes.java
@@ -80,6 +80,5 @@ public class ShuffleWriteTimes {
sort += times.getSort();
requireMemory += times.getRequireMemory();
waitFinish += times.getWaitFinish();
- total += times.getTotal();
}
}
diff --git
a/client-spark/common/src/main/java/org/apache/spark/shuffle/writer/WriteBufferManager.java
b/client-spark/common/src/main/java/org/apache/spark/shuffle/writer/WriteBufferManager.java
index 5b412300a..671fe6d7f 100644
---
a/client-spark/common/src/main/java/org/apache/spark/shuffle/writer/WriteBufferManager.java
+++
b/client-spark/common/src/main/java/org/apache/spark/shuffle/writer/WriteBufferManager.java
@@ -381,7 +381,7 @@ public class WriteBufferManager extends MemoryConsumer {
partitionList.sort(
Comparator.comparingInt(o -> buffers.get(o) == null ? 0 :
buffers.get(o).getMemoryUsed())
.reversed());
- sortTime += start;
+ sortTime += System.currentTimeMillis() - start;
targetSpillSize = (long) ((getUsedBytes() - getInSendListBytes()) *
bufferSpillRatio);
}