Skip to content

Commit 901b932

Browse files
authored
branch-2.1: [opt](log) add more info in nereids timeout log #45705 (#45793)
cherry-pick #45705
1 parent 6454ee6 commit 901b932

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/scheduler/SimpleJobScheduler.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ public void executeJobPool(ScheduleContext scheduleContext) {
3434
CascadesContext context = (CascadesContext) scheduleContext;
3535
SessionVariable sessionVariable = context.getConnectContext().getSessionVariable();
3636
while (!pool.isEmpty()) {
37+
long elapsedS = context.getStatementContext().getStopwatch().elapsed(TimeUnit.MILLISECONDS) / 1000;
3738
if (sessionVariable.enableNereidsTimeout
38-
&& context.getStatementContext().getStopwatch().elapsed(TimeUnit.MILLISECONDS)
39-
> sessionVariable.nereidsTimeoutSecond * 1000L) {
40-
throw new DoNotFallbackException(
41-
"Nereids cost too much time ( > " + sessionVariable.nereidsTimeoutSecond + "s )");
39+
&& elapsedS > sessionVariable.nereidsTimeoutSecond) {
40+
throw new DoNotFallbackException(String.format("Nereids cost too much time ( %ds > %ds",
41+
elapsedS, sessionVariable.nereidsTimeoutSecond));
4242
}
4343
Job job = pool.pop();
4444
job.execute();

0 commit comments

Comments
 (0)