[Improvement](executor)Add queue columns for active_queries#32259
[Improvement](executor)Add queue columns for active_queries#32259yiguolei merged 1 commit intoapache:masterfrom
Conversation
|
Thank you for your contribution to Apache Doris. |
|
run buildall |
|
run buildall |
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
|
clang-tidy review says "All clean, LGTM! 👍" |
TPC-H: Total hot run time: 38312 ms |
|
TeamCity be ut coverage result: |
| LOG.error("query (id=" + DebugUtil.printId(queryId) + ") " + queueToken.getOfferResultDetail()); | ||
| queryQueue.returnToken(queueToken); | ||
| throw new UserException(queueToken.getOfferResultDetail()); | ||
| long queueStartTime = System.currentTimeMillis(); |
There was a problem hiding this comment.
这么改不好,容易锁死。
直接把queue start time和queue end time 放到queue token 里,然后token 本身是coordinator的一个属性就ok了。
当我们显示的时候,直接从token 里拿start time和end time 就可以了
|
run buildall |
|
clang-tidy review says "All clean, LGTM! 👍" |
| } | ||
|
|
||
| @Override | ||
| public QueryInfo getQueryInfoByQueryId(TUniqueId queryId) throws UserException { |
There was a problem hiding this comment.
Both query start time and token are in coordinator, we could get these info directly from coordinator.
And QueryInfo contains a coordinator. So that we do not need these API any more.
| } | ||
| trow.addToColumnValue(new TCell().setStringVal(selfNode)); | ||
|
|
||
| QueueToken queueToken = queryInfo.getQueueToken(); |
There was a problem hiding this comment.
Do not use token directly here.
Add related method in QueryInfo, for example getQueueStartTime, getQueueEndTime
and then QueryInfo could use coordinator to get these time.
| return startExecTime; | ||
| } | ||
|
|
||
| public void setQueueToken(QueueToken queueToken) { |
There was a problem hiding this comment.
remove setQueueToken and getQueueToken setStartExecTime
Get these info from coordinator directly.
TPC-H: Total hot run time: 38578 ms |
|
TeamCity be ut coverage result: |
|
clang-tidy review says "All clean, LGTM! 👍" |
2 similar comments
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
run buildall |
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
|
clang-tidy review says "All clean, LGTM! 👍" |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
TPC-H: Total hot run time: 37997 ms |
|
TeamCity be ut coverage result: |
Add QUEUE_START_TIME/QUEUE_END_TIME/QUERY_STATUS column for active_queries;