zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eolivelli <...@git.apache.org>
Subject [GitHub] zookeeper pull request #673: [ZOOKEEPER-3177] Refactor request throttle logi...
Date Tue, 23 Oct 2018 20:44:59 GMT
Github user eolivelli commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/673#discussion_r227557275
  
    --- Diff: zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java
---
    @@ -1107,6 +1102,19 @@ public void processPacket(ServerCnxn cnxn, ByteBuffer incomingBuffer)
throws IOE
             BinaryInputArchive bia = BinaryInputArchive.getArchive(bais);
             RequestHeader h = new RequestHeader();
             h.deserialize(bia, "header");
    +
    +        // Need to increase the outstanding request count first, otherwise
    +        // there might be a race condition that it enabled recv after
    +        // processing request and then disabled when check throttling.
    +        //
    +        // It changes the semantic a bit, since when check throttling it's
    --- End diff --
    
    Something simpler, without comparing current code with the old one.
    
    Like:
    Beware that we are actually checking the global outstanding request before this
    request.
    
    How does it sound to you?


---

Mime
View raw message