liutang123 opened a new issue #6357:
URL: https://github.com/apache/incubator-doris/issues/6357


   **Is your feature request related to a problem? Please describe.**
   Currently, InternalErrorCode defines some error codes, which are generally 
placed in ErrorReason and UserException to indicate some internal error causes. 
If a UserException is thrown during the query, the error code will be returned 
to the client. For example, `ERROR 1064 (HY000): errCode = 2, detailMessage = 
Ocurrs time out with specfied time 993 MILLISECONDS`. 1064 is the code of 
`ErrorCode` and 2 is the InternalErrorCode.
   
   QueryState.ErrType is the result code of the query. There are only two 
types: Analysis_ERR and OTHER_ERR. The default is OTHER_ERR. When a 
UserException is caught in `ConnectProcessor.handleQuery` or in 
`StmtExecutor.execute`, it will be set to Analysis_ERR. OTHER_ERR query will 
increase MetricRepo.COUNTER_QUERY_ERR.
   
   1. Timeout queries are not counted as failed queries, and the status of the 
cluster cannot be accurately sensed.
   2. When the client gets the query result, it cannot match the error type 
according to the errCode, and can only perform regular matching according to 
the `detailMessage`.
   
   **Describe the solution you'd like**
   It is recommended to remove QueryState.ErrType and add query-related error 
codes.
   
   1. Errors caused by users
   Syntax error
   
   2. Load related
   Timeout (If the non-result node hangs, it may be misjudged as a timeout)
   Resource limit
   
   3. Internal system error causes the query to fail
   FE sends RPC error to BE
   No query node available 
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative solutions or features 
you've considered.
   
   **Additional context**
   Add any other context or screenshots about the feature request here.
   


-- 
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