wangbo commented on code in PR #27969:
URL: https://github.com/apache/doris/pull/27969#discussion_r1415083016


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -607,23 +607,29 @@ public void finalizeQuery() {
     private void handleQueryWithRetry(TUniqueId queryId) throws Exception {
         // queue query here
         syncJournalIfNeeded();
-        QueueOfferToken offerRet = null;
+        QueueToken offerRet = null;
         QueryQueue queryQueue = null;
         if (!parsedStmt.isExplain() && Config.enable_workload_group && 
Config.enable_query_queue
                 && context.getSessionVariable().getEnablePipelineEngine()) {
             queryQueue = 
context.getEnv().getWorkloadGroupMgr().getWorkloadGroupQueryQueue(context);
             try {
-                offerRet = queryQueue.offer();
+                offerRet = queryQueue.getToken();
             } catch (InterruptedException e) {
                 // this Exception means try lock/await failed, so no need to 
handle offer result
                 LOG.error("error happens when offer queue, query id=" + 
DebugUtil.printId(queryId) + " ", e);
                 throw new RuntimeException("interrupted Exception happens when 
queue query");
             }
-            if (offerRet != null && !offerRet.isOfferSuccess()) {
+            if (offerRet != null && !offerRet.enqueueSuccess()) {
                 String retMsg = "queue failed, reason=" + 
offerRet.getOfferResultDetail();
                 LOG.error("query (id=" + DebugUtil.printId(queryId) + ") " + 
retMsg);
                 throw new UserException(retMsg);
             }
+            if (!offerRet.waitSignal()) {
+                String retMsg = "queue success but wait too long in queue";

Review Comment:
   ```suggestion
                   String retMsg = offerRet.getOfferResultDetail();
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to