Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 DoNotFallbackException(
"Nereids cost too much time ( > " + sessionVariable.nereidsTimeoutSecond + "s )");
&& elapsedS > sessionVariable.nereidsTimeoutSecond) {
throw new DoNotFallbackException(String.format("Nereids cost too much time ( %ds > %ds",
elapsedS, sessionVariable.nereidsTimeoutSecond));
}
Job job = pool.pop();
job.execute();
Expand Down
Loading