imay commented on a change in pull request #2969: Improve implementation of 
Status
URL: https://github.com/apache/incubator-doris/pull/2969#discussion_r382882888
 
 

 ##########
 File path: be/src/common/status.cpp
 ##########
 @@ -50,18 +51,20 @@ Status::Status(const PStatus& s) : _state(nullptr) {
     TStatusCode::type code = (TStatusCode::type)s.status_code();
     if (code != TStatusCode::OK) {
         if (s.error_msgs_size() == 0) {
-            _state = assemble_state(code, Slice(), 1, Slice());
+            _state = assemble_state(code, Slice(), -1, Slice());
 
 Review comment:
   This has no relationship with posix code. For user reference, positive 
numbers are more convenient than negative numbers.
   When doing serialization, positive number can be encoded into smaller space, 
for example varint encode.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to