gavinchou commented on code in PR #66364:
URL: https://github.com/apache/doris/pull/66364#discussion_r3701367765
##########
cloud/src/meta-service/meta_service_helper.h:
##########
@@ -42,9 +43,13 @@
#include "resource-manager/resource_manager.h"
namespace doris::cloud {
+// Converts a response code and message to values that older clients can read.
+// set_response_code() stores the original code in actual_code
+// Call this function only from set_response_code() or from unit tests; do not
call it from other production code.
+// When adding an error code that may be returned to clients, must add its
conversion here.
inline MetaServiceCode get_legacy_code(MetaServiceCode code) {
Review Comment:
process msg too, append some message to indicate the real error on the
server size.
e.g.
```
get_legacy_code(MetaServiceCode code, std::string& msg)
case MetaServiceCode::MS_TOO_BUSY:
msg += " server MSCode=MS_TOO_BUSY converted to KV_TXN_CONFLICT for
compactibility"
return MetaServiceCode::KV_TXN_CONFLICT;
```
--
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]