[chore](log) Add more detail msg for waitRPC exception #27771
This commit is contained in:
@ -945,8 +945,12 @@ public class Coordinator implements CoordInterface {
|
||||
long leftTimeMs,
|
||||
String operation) throws RpcException, UserException {
|
||||
if (leftTimeMs <= 0) {
|
||||
throw new UserException("timeout before waiting for " + operation + " RPC. Elapse(sec): " + (
|
||||
(System.currentTimeMillis() - timeoutDeadline) / 1000 + queryOptions.getExecutionTimeout()));
|
||||
long elapsed = (System.currentTimeMillis() - timeoutDeadline) / 1000 + queryOptions.getExecutionTimeout();
|
||||
String msg = String.format(
|
||||
"timeout before waiting %s rpc, query timeout:%d, already elapsed:%d, left for this:%d",
|
||||
operation, queryOptions.getExecutionTimeout(), elapsed, leftTimeMs);
|
||||
LOG.warn("Query {} {}", DebugUtil.printId(queryId), msg);
|
||||
throw new UserException(msg);
|
||||
}
|
||||
|
||||
long timeoutMs = Math.min(leftTimeMs, Config.remote_fragment_exec_timeout_ms);
|
||||
@ -974,7 +978,10 @@ public class Coordinator implements CoordInterface {
|
||||
code = TStatusCode.INTERNAL_ERROR;
|
||||
} catch (TimeoutException e) {
|
||||
exception = e;
|
||||
errMsg = "timeout when waiting for " + operation + " RPC. Wait(sec): " + timeoutMs / 1000;
|
||||
errMsg = String.format(
|
||||
"timeout when waiting for %s rpc, query timeout:%d, left timeout for this operation:%d",
|
||||
operation, queryOptions.getExecutionTimeout(), timeoutMs / 1000);
|
||||
LOG.warn("Query {} {}", DebugUtil.printId(queryId), errMsg);
|
||||
code = TStatusCode.TIMEOUT;
|
||||
}
|
||||
|
||||
@ -1005,8 +1012,12 @@ public class Coordinator implements CoordInterface {
|
||||
Future<PExecPlanFragmentResult>>> futures, long leftTimeMs,
|
||||
String operation) throws RpcException, UserException {
|
||||
if (leftTimeMs <= 0) {
|
||||
throw new UserException("timeout before waiting for " + operation + " RPC. Elapse(sec): " + (
|
||||
(System.currentTimeMillis() - timeoutDeadline) / 1000 + queryOptions.query_timeout));
|
||||
long elapsed = (System.currentTimeMillis() - timeoutDeadline) / 1000 + queryOptions.getExecutionTimeout();
|
||||
String msg = String.format(
|
||||
"timeout before waiting %s rpc, query timeout:%d, already elapsed:%d, left for this:%d",
|
||||
operation, queryOptions.getExecutionTimeout(), elapsed, leftTimeMs);
|
||||
LOG.warn("Query {} {}", DebugUtil.printId(queryId), msg);
|
||||
throw new UserException(msg);
|
||||
}
|
||||
|
||||
long timeoutMs = Math.min(leftTimeMs, Config.remote_fragment_exec_timeout_ms);
|
||||
@ -1034,7 +1045,10 @@ public class Coordinator implements CoordInterface {
|
||||
code = TStatusCode.INTERNAL_ERROR;
|
||||
} catch (TimeoutException e) {
|
||||
exception = e;
|
||||
errMsg = "timeout when waiting for " + operation + " RPC. Wait(sec): " + timeoutMs / 1000;
|
||||
errMsg = String.format(
|
||||
"timeout when waiting for %s rpc, query timeout:%d, left timeout for this operation:%d",
|
||||
operation, queryOptions.getExecutionTimeout(), timeoutMs / 1000);
|
||||
LOG.warn("Query {} {}", DebugUtil.printId(queryId), errMsg);
|
||||
code = TStatusCode.TIMEOUT;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user