You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/08/05 06:45:24 UTC

[GitHub] [incubator-doris] liutang123 commented on a change in pull request #6358: Internal error code

liutang123 commented on a change in pull request #6358:
URL: https://github.com/apache/incubator-doris/pull/6358#discussion_r683173097



##########
File path: fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java
##########
@@ -124,10 +125,19 @@ private void auditAfterExec(String origStmt, StatementBase parsedStmt, Data.PQue
 
         if (ctx.getState().isQuery()) {
             MetricRepo.COUNTER_QUERY_ALL.increase(1L);
-            if (ctx.getState().getStateType() == QueryState.MysqlStateType.ERR
-                    && ctx.getState().getErrType() != QueryState.ErrType.ANALYSIS_ERR) {
-                // err query
-                MetricRepo.COUNTER_QUERY_ERR.increase(1L);
+            if (ctx.getState().getStateType() == QueryState.MysqlStateType.ERR) {
+                InternalErrorCode errorCode = ctx.getState().getInternalErrorCode();
+                if (errorCode == InternalErrorCode.INTERNAL_ERR) {
+                    // err query
+                    MetricRepo.COUNTER_QUERY_ERR.increase(1L);
+                } else {
+                    MetricRepo.COUNTER_QUERY_ERR_OTHER.increase(1L);
+                    MetricRepo.HISTO_QUERY_LATENCY.update(elapseMs);

Review comment:
       Userexception (timeout, cancel, etc) will be treated as `ANALYSIS_ERR`,`ANALYSIS_ERR` will be recorded in the query time. It is understandable that a known error query will be recorded in the query time.
   Therefore, this PR still records known errors (timeout, cancel, etc.) in the query time, and other errors (RPC, unknown errors) are not recorded in the query time.




-- 
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-unsubscribe@doris.apache.org

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



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