freemandealer opened a new pull request, #14080:
URL: https://github.com/apache/doris/pull/14080

   Fix vague error code in err log and stop printing backtrace stack in load 
result if tablet writer write failed. Providing error code & precise code is 
enough to identify the cause of the problem and leave the backtrace only in be 
log.
   
   Signed-off-by: freemandealer <[email protected]>
   
   # Proposed changes
   
   Issue Number: close #14078
   
   ## Problem summary
   
   Stop printing backtrace stack in load result if tablet writer write failed. 
Providing error code & precise code is enough to identify the cause of the 
problem and leave the backtrace only in be log.
   
   Example1: Load result after applying the patch
   ```
   {
       "TxnId": 4019,
       "Label": "08753366-87c5-444a-80bf-d733562b8a2b",
       "TwoPhaseCommit": "false",
       "Status": "Fail",
       "Message": "cancelled: tablet writer write failed, tablet_id=18155, 
txn_id=4019, err=6, precise_code=-238, host: 127.0.0.1",
       "NumberTotalRows": 0,
       "NumberLoadedRows": 0,
       "NumberFilteredRows": 0,
       "NumberUnselectedRows": 0,
       "LoadBytes": 632619008,
       "LoadTimeMs": 51621,
       "BeginTxnTimeMs": 0,
       "StreamLoadPutTimeMs": 40,
       "ReadDataTimeMs": 35999,
       "WriteDataTimeMs": 50574,
       "CommitAndPublishTimeMs": 0
   }
   ```
   
   Example2: be log after applying the patch
   ```
   E1108 19:42:13.457459 1017771 beta_rowset_writer.cpp:887] too many segments 
in rowset. max:2 _num_segment:2 _segcompacted_point:0 _num_segcompacted:0
   W1108 19:42:13.458135 1017771 memtable_flush_executor.cpp:92] Flush memtable 
failed with res = Internal error(error -238):  0# 
doris::Status::ConstructErrorStatus(short) at 
/mnt/disk1/zhangzhengyu/project/doris-build/be/src/common/status.cpp:78
    1# 
doris::BetaRowsetWriter::_create_segment_writer(std::unique_ptr<doris::segment_v2::SegmentWriter,
 std::default_delete<doris::segment_v2::SegmentWriter> >*) at 
/mnt/disk1/zhangzhengyu/project/doris-build/be/src/olap/rowset/beta_rowset_writer.cpp:892
    2# doris::BetaRowsetWriter::flush_single_memtable(doris::vectorized::Block 
const*) at 
/mnt/disk1/zhangzhengyu/project/doris-build/be/src/olap/rowset/beta_rowset_writer.cpp:691
    3# doris::MemTable::_do_flush(long&) at 
/mnt/disk1/zhangzhengyu/project/doris-build/be/src/olap/memtable.cpp:472
    4# doris::MemTable::flush() at 
/mnt/disk1/zhangzhengyu/project/doris-build/be/src/olap/memtable.cpp:441
   ```
   
   Describe your changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [X] Yes
       - [ ] No
       - [ ] I don't know
   2. Has unit tests been added:
       - [ ] Yes
       - [ ] No
       - [X] No Need
   3. Has document been added or modified:
       - [ ] Yes
       - [ ] No
       - [X] No Need
   4. Does it need to update dependencies:
       - [ ] Yes
       - [X] No
   5. Are there any changes that cannot be rolled back:
       - [ ] Yes (If Yes, please explain WHY)
       - [X] No
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[[email protected]](mailto:[email protected]) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   
   


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