zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] eolivelli commented on a change in pull request #787: ZOOKEEPER-3253: client should not send requests with cxid=-4, -2, or -1
Date Fri, 25 Jan 2019 21:34:02 GMT
eolivelli 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_r251143313
 
 

 ##########
 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
 
 Review comment:
   I am thinking about having constants only _locally_ to this file, this way it will be easier
to understand the code and the patch wouldn't be so intrusive.
   In the (hopefully near) future we will separate client size code from server side code
so introducing new shared constants would be overkilling.
   
   I don't fell strong about having such constants, it is only a thought/suggestion.
   
   cc @anmolnar @lvfangmin @hanm 

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

Mime
View raw message