jamesge commented on a change in pull request #972: Redis server protocol
URL: https://github.com/apache/incubator-brpc/pull/972#discussion_r354712016
 
 

 ##########
 File path: src/brpc/redis_reply.cpp
 ##########
 @@ -320,9 +376,14 @@ void RedisReply::CopyFromDifferentArena(const RedisReply& 
other,
         }
         _data.array.last_index = other._data.array.last_index;
         if (_data.array.last_index > 0) {
+            // incomplete state
             for (int i = 0; i < _data.array.last_index; ++i) {
                 subs[i].CopyFromDifferentArena(other._data.array.replies[i], 
arena);
             }
+        } else {
+            for (size_t i = 0; i < _length; ++i) {
+                subs[i].CopyFromDifferentArena(other._data.array.replies[i], 
arena);
+            }
 
 Review comment:
   这应该是个bug,能构造一个case么?

----------------------------------------------------------------
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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to