Skip to content

Commit

Permalink
[opt](log) add more info in nereids timeout log
Browse files Browse the repository at this point in the history
  • Loading branch information
morningman committed Dec 20, 2024
1 parent 2a1209d commit 8bce271
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ public void executeJobPool(ScheduleContext scheduleContext) {
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();
Expand Down

0 comments on commit 8bce271

Please sign in to comment.