This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new cccc9bb8bed [opt](log) add more info in nereids timeout log (#45705) cccc9bb8bed is described below commit cccc9bb8beddb271537d4434cab20dc1ad16dde8 Author: Mingyu Chen (Rayner) <morning...@163.com> AuthorDate: Mon Dec 23 13:53:27 2024 +0800 [opt](log) add more info in nereids timeout log (#45705) ### What problem does this PR solve? Add elapsed time in log --- .../apache/doris/nereids/jobs/scheduler/SimpleJobScheduler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/scheduler/SimpleJobScheduler.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/scheduler/SimpleJobScheduler.java index e31c92e3fe0..1354f895a3c 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/scheduler/SimpleJobScheduler.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/scheduler/SimpleJobScheduler.java @@ -34,11 +34,11 @@ public class SimpleJobScheduler implements JobScheduler { CascadesContext context = (CascadesContext) scheduleContext; SessionVariable sessionVariable = context.getConnectContext().getSessionVariable(); while (!pool.isEmpty()) { + long elapsedS = context.getStatementContext().getStopwatch().elapsed(TimeUnit.MILLISECONDS) / 1000; if (sessionVariable.enableNereidsTimeout - && context.getStatementContext().getStopwatch().elapsed(TimeUnit.MILLISECONDS) - > sessionVariable.nereidsTimeoutSecond * 1000L) { - throw new AnalysisException( - "Nereids cost too much time ( > " + sessionVariable.nereidsTimeoutSecond + "s )"); + && elapsedS > sessionVariable.nereidsTimeoutSecond) { + throw new AnalysisException(String.format("Nereids cost too much time ( %ds > %ds", + elapsedS, sessionVariable.nereidsTimeoutSecond)); } Job job = pool.pop(); job.execute(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org