This is an automated email from the ASF dual-hosted git repository.
xianjingfeng 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 99d5c3a11 [#2525][FOLLOWUP] fix(server): remove metric
`buffer_block_size` (#2567)
99d5c3a11 is described below
commit 99d5c3a1165ebe9f6fb024eb625a0afbf8756460
Author: xianjingfeng <[email protected]>
AuthorDate: Mon Aug 4 11:19:53 2025 +0800
[#2525][FOLLOWUP] fix(server): remove metric `buffer_block_size` (#2567)
### What changes were proposed in this pull request?
Remove metric `buffer_block_size`
### Why are the changes needed?
The observations of Summary are expensive due to the streaming quantile
calculation and synchronized is used in `Summary.observe`.
### Does this PR introduce any user-facing change?
No.
### How was this patch tested?
CI
---
.../src/main/java/org/apache/uniffle/server/ShuffleServerMetrics.java | 3 ---
.../org/apache/uniffle/server/buffer/ShuffleBufferWithLinkedList.java | 2 --
.../org/apache/uniffle/server/buffer/ShuffleBufferWithSkipList.java | 2 --
3 files changed, 7 deletions(-)
diff --git
a/server/src/main/java/org/apache/uniffle/server/ShuffleServerMetrics.java
b/server/src/main/java/org/apache/uniffle/server/ShuffleServerMetrics.java
index f8689553c..ced8a17a0 100644
--- a/server/src/main/java/org/apache/uniffle/server/ShuffleServerMetrics.java
+++ b/server/src/main/java/org/apache/uniffle/server/ShuffleServerMetrics.java
@@ -155,7 +155,6 @@ public class ShuffleServerMetrics {
private static final String LAB_CHUNK_POOL_REMAIN_PERCENT =
"lab_chunk_pool_remain_percent";
private static final String NOT_ON_LAB_BLOCK_COUNT =
"not_on_lab_block_count";
private static final String ON_LAB_BLOCK_COUNT = "on_lab_block_count";
- private static final String BUFFER_BLOCK_SIZE = "buffer_block_size";
public static final String TOPN_OF_TOTAL_DATA_SIZE_FOR_APP =
"topN_of_total_data_size_for_app";
public static final String TOPN_OF_IN_MEMORY_DATA_SIZE_FOR_APP =
"topN_of_in_memory_data_size_for_app";
@@ -280,7 +279,6 @@ public class ShuffleServerMetrics {
public static Gauge gaugeLABChunkPoolRemainPercent;
public static Counter counterBlockNotOnLAB;
public static Counter counterBlockOnLAB;
- public static Summary summaryBufferBlockSize;
private static MetricsManager metricsManager;
private static boolean isRegister = false;
@@ -524,7 +522,6 @@ public class ShuffleServerMetrics {
counterBlockNotOnLAB = metricsManager.addCounter(NOT_ON_LAB_BLOCK_COUNT);
counterBlockOnLAB = metricsManager.addCounter(ON_LAB_BLOCK_COUNT);
- summaryBufferBlockSize = metricsManager.addSummary(BUFFER_BLOCK_SIZE);
gaugeTotalDataSizeUsage =
Gauge.build()
.name(TOPN_OF_TOTAL_DATA_SIZE_FOR_APP)
diff --git
a/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferWithLinkedList.java
b/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferWithLinkedList.java
index 9d4a5a57f..2216e2907 100644
---
a/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferWithLinkedList.java
+++
b/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferWithLinkedList.java
@@ -37,7 +37,6 @@ import org.apache.uniffle.common.util.Constants;
import org.apache.uniffle.common.util.JavaUtils;
import org.apache.uniffle.server.ShuffleDataFlushEvent;
import org.apache.uniffle.server.ShuffleFlushManager;
-import org.apache.uniffle.server.ShuffleServerMetrics;
public class ShuffleBufferWithLinkedList extends AbstractShuffleBuffer {
// blocks will be added to inFlushBlockMap as <eventId, blocks> pair
@@ -60,7 +59,6 @@ public class ShuffleBufferWithLinkedList extends
AbstractShuffleBuffer {
long currentDataLength = 0;
for (ShufflePartitionedBlock block : data.getBlockList()) {
-
ShuffleServerMetrics.summaryBufferBlockSize.observe(block.getDataLength());
// If sendShuffleData retried, we may receive duplicate block. The
duplicate
// block would gc without release. Here we must release the duplicated
block.
if (addBlock(block)) {
diff --git
a/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferWithSkipList.java
b/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferWithSkipList.java
index 83f526a5c..33ba313ce 100644
---
a/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferWithSkipList.java
+++
b/server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferWithSkipList.java
@@ -39,7 +39,6 @@ import org.apache.uniffle.common.util.Constants;
import org.apache.uniffle.common.util.JavaUtils;
import org.apache.uniffle.server.ShuffleDataFlushEvent;
import org.apache.uniffle.server.ShuffleFlushManager;
-import org.apache.uniffle.server.ShuffleServerMetrics;
public class ShuffleBufferWithSkipList extends AbstractShuffleBuffer {
private ConcurrentSkipListMap<Long, ShufflePartitionedBlock> blocksMap;
@@ -67,7 +66,6 @@ public class ShuffleBufferWithSkipList extends
AbstractShuffleBuffer {
long currentDataLength = 0;
for (ShufflePartitionedBlock block : data.getBlockList()) {
-
ShuffleServerMetrics.summaryBufferBlockSize.observe(block.getDataLength());
// If sendShuffleData retried, we may receive duplicate block. The
duplicate
// block would gc without release. Here we must release the duplicated
block.
if (!blocksMap.containsKey(block.getBlockId())) {