You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/02/25 18:49:07 UTC

[GitHub] athanatos commented on a change in pull request #787: ZOOKEEPER-3253: client should not send requests with cxid=-4, -2, or -1

athanatos commented on a change in pull request #787: ZOOKEEPER-3253: client should not send requests with cxid=-4, -2, or -1
URL: https://github.com/apache/zookeeper/pull/787#discussion_r259966632
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java
 ##########
 @@ -1510,6 +1511,11 @@ public void close() throws IOException {
      * the server. Thus, getXid() must be public.
      */
     synchronized public int getXid() {
+        // xid values of -4, -2, and -1 are special, see SendThread.readResponse
+        // Skip from -5 to 1.
 
 Review comment:
   A reasonable point.  Nothing I could find directly compares cxid values or will otherwise notice the MAX to MIN wrap, so I chose to use the full range.  I'll switch it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services