wangbo commented on code in PR #8900:
URL: https://github.com/apache/incubator-doris/pull/8900#discussion_r845077790
##########
be/src/common/status.h:
##########
@@ -151,8 +155,18 @@ class Status {
return Status(TStatusCode::DATA_QUALITY_ERROR, msg, precise_code,
msg2);
}
+ // A wrapper for OLAPStatus
+ // Precise code is for OLAPStatus's enum value
+ // All Status Error is treated as Internal Error
+ static Status OLAPInternalError(int16_t precise_code, const Slice& msg =
Slice()) {
+ #ifdef PRINT_ALL_ERR_STATUS_STACKTRACE
+ LOG(WARNING) << "Error occurred, error code = " << precise_code << ",
with message: " << msg
+ << "\n" << boost::stacktrace::stacktrace();
+ #endif
+ return Status(TStatusCode::INTERNAL_ERROR, Slice(), precise_code, msg);
+ }
+
bool ok() const { return _length == 0; }
Review Comment:
Because ```_length = size + HEADER_LEN;```,
So ```ok()``` should mean ```_length == HEADER_LEN``` ?
--
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]