You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2022/04/19 09:30:39 UTC

[GitHub] [incubator-brpc] lzfhust commented on a diff in pull request #1745: Redis empty request

lzfhust commented on code in PR #1745:
URL: https://github.com/apache/incubator-brpc/pull/1745#discussion_r852813824


##########
src/brpc/policy/redis_protocol.cpp:
##########
@@ -305,6 +305,11 @@ void SerializeRedisRequest(butil::IOBuf* buf,
         return cntl->SetFailed(EREQUEST, "The request is not a RedisRequest");
     }
     const RedisRequest* rr = (const RedisRequest*)request;
+    // If redis byte size is zero, brpc call will fail with E22. Continuous E22 may cause E112 in the end.
+    // So set failed and return useful error message
+    if(rr->ByteSize() == 0) {

Review Comment:
   > if 后面加个空格
   
   done



-- 
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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org