From a6ac9186031e2a5ce6c449febfcb821b7c496139 Mon Sep 17 00:00:00 2001 From: hezhiqiang Date: Sun, 26 Jan 2025 21:25:04 +0800 Subject: [PATCH 1/2] FX --- .../doris/common/profile/RuntimeProfile.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/profile/RuntimeProfile.java b/fe/fe-core/src/main/java/org/apache/doris/common/profile/RuntimeProfile.java index d8aa353b380020..0f2fa26e6f2cc6 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/profile/RuntimeProfile.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/profile/RuntimeProfile.java @@ -529,18 +529,20 @@ private static void mergeCounters(String parentCounterName, List for (String childCounterName : childCounterSet) { Counter counter = templateProfile.counterMap.get(childCounterName); if (counter == null) { - throw new RuntimeException("Child counter " + childCounterName + " of " + parentCounterName - + " not found in profile"); + if (LOG.isDebugEnabled()) { + LOG.debug("Child counter {} of {} not found in profile {}", childCounterName, parentCounterName, + templateProfile.toString()); + } + continue; } if (counter.getLevel() == 1) { Counter oldCounter = templateCounterMap.get(childCounterName); AggCounter aggCounter = new AggCounter(oldCounter.getType()); for (RuntimeProfile profile : profiles) { + // orgCounter could be null if counter structure is changed + // change of counter structure happens when NonZeroCounter is involved. + // So here we have to ignore the counter if it is not found in the profile. Counter orgCounter = profile.counterMap.get(childCounterName); - if (orgCounter == null) { - throw new RuntimeException("Child counter " + childCounterName - + " of " + parentCounterName + " not found in profile"); - } aggCounter.addCounter(orgCounter); } if (nereidsId != null && childCounterName.equals("RowsProduced")) { From bb6b44f1b7084564a77d92bb03c6733bf9ee1706 Mon Sep 17 00:00:00 2001 From: hezhiqiang Date: Sun, 26 Jan 2025 22:06:59 +0800 Subject: [PATCH 2/2] FMT --- .../java/org/apache/doris/common/profile/RuntimeProfile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/profile/RuntimeProfile.java b/fe/fe-core/src/main/java/org/apache/doris/common/profile/RuntimeProfile.java index 0f2fa26e6f2cc6..f8d88a099fd58e 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/profile/RuntimeProfile.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/profile/RuntimeProfile.java @@ -531,7 +531,7 @@ private static void mergeCounters(String parentCounterName, List if (counter == null) { if (LOG.isDebugEnabled()) { LOG.debug("Child counter {} of {} not found in profile {}", childCounterName, parentCounterName, - templateProfile.toString()); + templateProfile.toString()); } continue; }