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/03/06 02:18:23 UTC

[GitHub] [zookeeper] phunt commented on issue #787: ZOOKEEPER-3253: client should not send requests with cxid=-4, -2, or -1

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