Zhewei Hu created ZOOKEEPER-4401:
------------------------------------

             Summary: ZooKeeper may report the number of outstanding requests 
improperly
                 Key: ZOOKEEPER-4401
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4401
             Project: ZooKeeper
          Issue Type: Bug
            Reporter: Zhewei Hu


In the ZooKeeperServer.java, we report the number of outstanding requests by 
below method:
{code:java}
/**     
* return the outstanding requests     
* in the queue, which haven't been     
* processed yet     
*/    
public long getOutstandingRequests() {        
    return getInProcess();    
}
{code}
However, based on my understanding, the getInProcess() method returns the 
number of requests in the process pipeline (requestsInProcess) since we 
increase the value of requestsInProcess after the request enters the 
PreRequestProcessor and decrease the value of requestsInProcess after the 
request in the FinalRequestProcess.

Since we have already maintain the outstandingCount in ServerCnxn.java, 
shouldn't we call the getOutstandingRequests() method to report the number of 
outstanding requests?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to