mkevo commented on a change in pull request #5397: URL: https://github.com/apache/geode/pull/5397#discussion_r464297701
########## File path: geode-cq/src/main/java/org/apache/geode/cache/query/cq/internal/ServerCQImpl.java ########## @@ -367,10 +367,12 @@ public void close(boolean sendRequestToServer) throws CqClosedException, CqExcep this.removeFromCqMap(); // Stat update. - if (stateBeforeClosing == CqStateImpl.RUNNING) { - cqService.stats().decCqsActive(); - } else if (stateBeforeClosing == CqStateImpl.STOPPED) { - cqService.stats().decCqsStopped(); + if (!cqName.equals(serverCqName)) { Review comment: I need somehow to makes difference between servers, one on which cq is register and others on which it will process registerCq. The server on which cq is registered doing also incrementing active activeCqCount, but while closing or stopping it decrements on all, but with this check it will decrement just on the one server where it is incremented. I'm not sure if this is a good check but it works, and I asked on dev list for a help to differentiate on which decrement is needed, but It is concluded that this is a bug but without any idea how to differentiate it. ---------------------------------------------------------------- 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: us...@infra.apache.org