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:
[email protected]


With regards,
Apache Git Services

Reply via email to