From c3c7bc434081a415e1bb62611178ee6c8cba8100 Mon Sep 17 00:00:00 2001 From: luozenglin <37725793+luozenglin@users.noreply.github.com> Date: Fri, 10 Mar 2023 08:44:32 +0800 Subject: [PATCH] [fix](profile) fix profile sort child list exception (#17613) --- .../java/org/apache/doris/common/util/RuntimeProfile.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/util/RuntimeProfile.java b/fe/fe-core/src/main/java/org/apache/doris/common/util/RuntimeProfile.java index 981f7be77d..e3e61faf18 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/util/RuntimeProfile.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/util/RuntimeProfile.java @@ -438,6 +438,13 @@ public class RuntimeProfile { try { this.childList.sort((profile1, profile2) -> Long.compare(profile2.first.getCounterTotalTime().getValue(), profile1.first.getCounterTotalTime().getValue())); + } catch (IllegalArgumentException e) { + // This exception may be thrown if the counter total time of the child is updated in the update method + // during the sorting process. This sorting only affects the profile instance display order, so this + // exception is temporarily ignored here. + if (LOG.isDebugEnabled()) { + LOG.debug("sort child list error: ", e); + } } finally { childLock.writeLock().unlock(); }