amosbird commented on code in PR #1762:
URL: https://github.com/apache/incubator-brpc/pull/1762#discussion_r872108717
##########
src/brpc/policy/baidu_rpc_protocol.cpp:
##########
@@ -80,11 +80,11 @@ static void SerializeRpcHeaderAndMeta(
::google::protobuf::io::CodedOutputStream coded_out(&arr_out);
meta.SerializeWithCachedSizes(&coded_out); // not calling ByteSize
again
CHECK(!coded_out.HadError());
- out->append(header_and_meta, sizeof(header_and_meta));
+ CHECK_EQ(0, out->append(header_and_meta, sizeof(header_and_meta)));
Review Comment:
IIUC this is just a assertion and will only be effective in debug build.
Perhaps we should change the return type of `SerializeRpcHeaderAndMeta` into
`bool` and handle it properly, similar to what we did for
`SerializeAsCompressedData`.
--
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]