zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] phunt commented on issue #787: ZOOKEEPER-3253: client should not send requests with cxid=-4, -2, or -1
Date Wed, 06 Mar 2019 02:18:23 GMT
phunt commented on issue #787: ZOOKEEPER-3253: client should not send requests with cxid=-4,
-2, or -1
URL: https://github.com/apache/zookeeper/pull/787#issuecomment-469939867
 
 
   +1, lgtm. thanks @athanatos 
   
   I also reviewed the server side code and it looks like client xid "going back in time"
(my earlier concern) is fine.
   
   I did notice this however - notice negative client xids circumvent throttling! So we're
fixing this bug as well by resetting the xid before it rolls over.
   
   ```
       public void incrOutstandingAndCheckThrottle(RequestHeader h) {
           if (h.getXid() <= 0) {
               return;
           }
           if (zkServer.shouldThrottle(outstandingCount.incrementAndGet())) {
               disableRecv(false);
           }
       }
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message