agingade commented on a change in pull request #5397: URL: https://github.com/apache/geode/pull/5397#discussion_r487137679
########## 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: Sorry for late response... The CQs are registered based on the subscription-redundancy. Servers on which they are registered should be treating them as activeCQCounts. When the CQs are closed. They all will get closed, decrementing the active CQCount. Can you try this with java client test...And see it is the behavior. >> one on which cq is register and others on which it will process registerCq. Are you seeing CQs that are only getting registered but not processed? that seems to be wrong...Are I am missing something. ########## 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: Again, sorry for delayed response. If needed you can always send a direct email to me. ########## 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: Sorry for late response... The CQs are registered based on the subscription-redundancy. Servers on which they are registered should be treating them as activeCQCounts. When the CQs are closed. They all will get closed, decrementing the active CQCount. Can you try this with java client test...And see it is the behavior. >> one on which cq is register and others on which it will process registerCq. Are you seeing CQs that are only getting registered but not processed? that seems to be wrong...Are I am missing something. ########## 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: Again, sorry for delayed response. If needed you can always send a direct email to me. ########## 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: Sorry for late response... The CQs are registered based on the subscription-redundancy. Servers on which they are registered should be treating them as activeCQCounts. When the CQs are closed. They all will get closed, decrementing the active CQCount. Can you try this with java client test...And see it is the behavior. >> one on which cq is register and others on which it will process registerCq. Are you seeing CQs that are only getting registered but not processed? that seems to be wrong...Are I am missing something. ########## 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: Again, sorry for delayed response. If needed you can always send a direct email to me. ########## 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: Sorry for late response... The CQs are registered based on the subscription-redundancy. Servers on which they are registered should be treating them as activeCQCounts. When the CQs are closed. They all will get closed, decrementing the active CQCount. Can you try this with java client test...And see it is the behavior. >> one on which cq is register and others on which it will process registerCq. Are you seeing CQs that are only getting registered but not processed? that seems to be wrong...Are I am missing something. ########## 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: Again, sorry for delayed response. If needed you can always send a direct email to me. ########## 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: Sorry for late response... The CQs are registered based on the subscription-redundancy. Servers on which they are registered should be treating them as activeCQCounts. When the CQs are closed. They all will get closed, decrementing the active CQCount. Can you try this with java client test...And see it is the behavior. >> one on which cq is register and others on which it will process registerCq. Are you seeing CQs that are only getting registered but not processed? that seems to be wrong...Are I am missing something. ########## 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: Again, sorry for delayed response. If needed you can always send a direct email to me. ########## 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: Sorry for late response... The CQs are registered based on the subscription-redundancy. Servers on which they are registered should be treating them as activeCQCounts. When the CQs are closed. They all will get closed, decrementing the active CQCount. Can you try this with java client test...And see it is the behavior. >> one on which cq is register and others on which it will process registerCq. Are you seeing CQs that are only getting registered but not processed? that seems to be wrong...Are I am missing something. ########## 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: Again, sorry for delayed response. If needed you can always send a direct email to me. ########## 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: Sorry for late response... The CQs are registered based on the subscription-redundancy. Servers on which they are registered should be treating them as activeCQCounts. When the CQs are closed. They all will get closed, decrementing the active CQCount. Can you try this with java client test...And see it is the behavior. >> one on which cq is register and others on which it will process registerCq. Are you seeing CQs that are only getting registered but not processed? that seems to be wrong...Are I am missing something. ########## 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: Again, sorry for delayed response. If needed you can always send a direct email to me. ########## 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: Sorry for late response... The CQs are registered based on the subscription-redundancy. Servers on which they are registered should be treating them as activeCQCounts. When the CQs are closed. They all will get closed, decrementing the active CQCount. Can you try this with java client test...And see it is the behavior. >> one on which cq is register and others on which it will process registerCq. Are you seeing CQs that are only getting registered but not processed? that seems to be wrong...Are I am missing something. ########## 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: Again, sorry for delayed response. If needed you can always send a direct email to me. ---------------------------------------------------------------- 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