Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions fe/fe-core/src/main/java/org/apache/doris/common/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -1753,4 +1753,12 @@ public class Config extends ConfigBase {
*/
@ConfField(mutable = true)
public static boolean enable_new_es_dsl = true;

/**
* The timeout of executing async remote fragment.
* In normal case, the async remote fragment will be executed in a short time. If system are under high load
* condition,try to set this timeout longer.
*/
@ConfField(mutable = true)
public static long remote_fragment_exec_timeout_ms = 5000; // 5 sec
}
8 changes: 4 additions & 4 deletions fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
Original file line number Diff line number Diff line change
Expand Up @@ -689,13 +689,14 @@ private void sendFragment() throws TException, RpcException, UserException {
}
}

private void waitRpc(List<Pair<BackendExecStates, Future<PExecPlanFragmentResult>>> futures, long timeoutMs,
private void waitRpc(List<Pair<BackendExecStates, Future<PExecPlanFragmentResult>>> futures, long leftTimeMs,
String operation) throws RpcException, UserException {
if (timeoutMs <= 0) {
if (leftTimeMs <= 0) {
throw new UserException("timeout before waiting for " + operation + " RPC. Elapse(sec): " + (
(System.currentTimeMillis() - timeoutDeadline) / 1000 + queryOptions.query_timeout));
}

long timeoutMs = Math.min(leftTimeMs, Config.remote_fragment_exec_timeout_ms);
for (Pair<BackendExecStates, Future<PExecPlanFragmentResult>> pair : futures) {
TStatusCode code;
String errMsg = null;
Expand All @@ -720,8 +721,7 @@ private void waitRpc(List<Pair<BackendExecStates, Future<PExecPlanFragmentResult
code = TStatusCode.INTERNAL_ERROR;
} catch (TimeoutException e) {
exception = e;
errMsg = "timeout when waiting for " + operation + " RPC. Elapse(sec): "
+ ((System.currentTimeMillis() - timeoutDeadline) / 1000 + queryOptions.query_timeout);
errMsg = "timeout when waiting for " + operation + " RPC. Wait(sec): " + timeoutMs / 1000;
code = TStatusCode.TIMEOUT;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,9 @@ suite("test_window_function") {
line = line + cur + ")"
}
}

sql """ admin set frontend config("remote_fragment_exec_timeout_ms"="60000"); """

qt_window_hang2"""select A.${k1}, A.wj - B.dyk + 1 as num from
(select ${k1}, wj from ${line} as W1) as A join
(select ${k1}, min(wj) as dyk from ${line} as W2 group by ${k1}) as B
Expand Down