[enhancement](timeout) replace query timeout with exec timeout (#17360)
This commit is contained in:
@ -228,7 +228,7 @@ public class UpdateStmtExecutor {
|
||||
updateStmtExecutor.analyzer = updateStmt.getAnalyzer();
|
||||
updateStmtExecutor.queryId = updateStmtExecutor.analyzer.getContext().queryId();
|
||||
updateStmtExecutor.timeoutSecond = updateStmtExecutor.analyzer.getContext()
|
||||
.getSessionVariable().getQueryTimeoutS();
|
||||
.getExecTimeout();
|
||||
updateStmtExecutor.updatePlanner = new UpdatePlanner(updateStmtExecutor.dbId, updateStmtExecutor.targetTable,
|
||||
updateStmt.getSetExprs(), updateStmt.getSrcTupleDesc(),
|
||||
updateStmt.getAnalyzer());
|
||||
|
||||
@ -44,7 +44,7 @@ public class MasterCatalogExecutor {
|
||||
// The method may be called by FrontendServiceImpl from BE, which does not have ConnectContext.
|
||||
waitTimeoutMs = 300 * 1000;
|
||||
} else {
|
||||
waitTimeoutMs = ctx.getSessionVariable().getQueryTimeoutS() * 1000;
|
||||
waitTimeoutMs = ctx.getExecTimeout() * 1000;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -56,11 +56,11 @@ public class MasterOpExecutor {
|
||||
this.originStmt = originStmt;
|
||||
this.ctx = ctx;
|
||||
if (status.isNeedToWaitJournalSync()) {
|
||||
this.waitTimeoutMs = ctx.getSessionVariable().getQueryTimeoutS() * 1000;
|
||||
this.waitTimeoutMs = ctx.getExecTimeout() * 1000;
|
||||
} else {
|
||||
this.waitTimeoutMs = 0;
|
||||
}
|
||||
this.thriftTimeoutMs = ctx.getSessionVariable().getQueryTimeoutS() * 1000;
|
||||
this.thriftTimeoutMs = ctx.getExecTimeout() * 1000;
|
||||
// if isQuery=false, we shouldn't retry twice when catch exception because of Idempotency
|
||||
this.shouldNotRetry = !isQuery;
|
||||
}
|
||||
|
||||
@ -41,8 +41,8 @@ public class MasterTxnExecutor {
|
||||
|
||||
public MasterTxnExecutor(ConnectContext ctx) {
|
||||
this.ctx = ctx;
|
||||
this.waitTimeoutMs = ctx.getSessionVariable().getQueryTimeoutS() * 1000;
|
||||
this.thriftTimeoutMs = ctx.getSessionVariable().getQueryTimeoutS() * 1000;
|
||||
this.waitTimeoutMs = ctx.getExecTimeout() * 1000;
|
||||
this.thriftTimeoutMs = ctx.getExecTimeout() * 1000;
|
||||
}
|
||||
|
||||
private TNetworkAddress getMasterAddress() throws TException {
|
||||
|
||||
@ -86,7 +86,7 @@ public class UpdateStmtExecutorTest {
|
||||
result = 1;
|
||||
analyzer.getContext().queryId();
|
||||
result = new TUniqueId(1, 2);
|
||||
analyzer.getContext().getSessionVariable().getQueryTimeoutS();
|
||||
analyzer.getContext().getExecTimeout();
|
||||
result = 1000;
|
||||
olapTable.getId();
|
||||
result = 2;
|
||||
|
||||
Reference in New Issue
Block a user