yiguolei commented on code in PR #11704:
URL: https://github.com/apache/doris/pull/11704#discussion_r944035868


##########
be/src/common/status.cpp:
##########
@@ -58,18 +59,18 @@ Status::Status(const PStatus& s) {
     if (code != TStatusCode::OK) {
         // It is ok to set precise code == 1 here, because we do not know the 
precise code
         // just from thrift's TStatus
-        if (s.error_msgs_size() == 0) {
-            assemble_state(code, Slice(), 1, Slice());
-        } else {
-            assemble_state(code, s.error_msgs(0), 1, Slice());
+        _code = code;
+        _precise_code = 1;
+        if (s.error_msgs_size() > 0) {
+            _err_msg = s.error_msgs(0);
         }
     } else {
-        _length = 0;
+        _code = 0;
     }
 }
 
 // Implement it here to remove the boost header file from status.h to reduce 
precompile time
-Status Status::ConstructErrorStatus(int16_t precise_code, const Slice& msg) {

Review Comment:
   why remove msg here? I think the error should be  error message + error 
stack.



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