liumh8 commented on a change in pull request #1128:
URL: https://github.com/apache/incubator-brpc/pull/1128#discussion_r436636520
##########
File path: src/brpc/redis.cpp
##########
@@ -436,8 +436,9 @@ std::ostream& operator<<(std::ostream& os, const
RedisResponse& response) {
return os;
}
-bool RedisService::AddCommandHandler(const std::string& name,
RedisCommandHandler* handler) {
- std::string lcname = StringToLowerASCII(name);
+bool RedisService::AddCommandHandler(const butil::StringPiece& name,
+ RedisCommandHandler* handler) {
+ std::string lcname = StringToLowerASCII(name.as_string());
Review comment:
已修改
##########
File path: src/brpc/redis_command.cpp
##########
@@ -420,7 +420,7 @@ ParseError RedisCommandParser::Consume(butil::IOBuf& buf,
char* d = (char*)arena->allocate((len/8 + 1) * 8);
buf.cutn(d, len);
d[len] = '\0';
- _commands[_index] = d;
+ _args[_index] = butil::StringPiece(d, len);
Review comment:
已修改
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]