freemandealer opened a new issue, #12121:
URL: https://github.com/apache/doris/issues/12121

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Description
   
   Current warning log contains hardly anything useful to diagnose why write 
fails:
   ```
   //be/src/runtime/tablets_channel.cpp
   //Status TabletsChannel::add_batch
   
       auto err_msg = strings::Substitute(
                      "tablet writer write failed, tablet_id=$0, txn_id=$1, 
err=$2",
                      tablet_to_rowidxs_it.first, _txn_id, st.code());
   ```
   The `st.code()` is too generic to identify the root cause. E.g., when I got 
err=6, aka INTERNAL_ERROR, it could be OLAP_ERR_ALREADY_CANCELLED, 
OLAP_ERR_TOO_MANY_SEGMENTS, OLAP_ERR_TABLE_NOT_FOUND, 
OLAP_ERR_TOO_MANY_VERSION, etc.
   
   Althougn we can use 'side-channel' information to guess what has happened, I 
think it better to offer a detailed error message directly.
   
   ### Solution
   
   privide info like:
   ```
   st.precise_code();
   st.get_error_msg();
   ```
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to