You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/09/11 15:56:00 UTC

[jira] [Commented] (GEODE-8293) activeCQCount has negative value

    [ https://issues.apache.org/jira/browse/GEODE-8293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17194359#comment-17194359 ] 

ASF GitHub Bot commented on GEODE-8293:
---------------------------------------

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.
   
   
   
   
   
   




----------------------------------------------------------------
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


> activeCQCount has negative value
> --------------------------------
>
>                 Key: GEODE-8293
>                 URL: https://issues.apache.org/jira/browse/GEODE-8293
>             Project: Geode
>          Issue Type: Bug
>          Components: statistics
>            Reporter: Mario Kevo
>            Assignee: Mario Kevo
>            Priority: Major
>              Labels: pull-request-available
>
> In case you have more than one server in the system and you close CQ there will be negative value of active cqs.
> The problem is when you started more than one server and execute cq on it. In that case we got incCqsActive on one server, but when it is closed we have decCqsActive on both servers.
> {code:java}
> gfsh>show metrics --categories=query
> Cluster-wide MetricsCategory |      Metric      | Value
> -------- | ---------------- | -----
> query    | activeCQCount    | 1
>          | queryRequestRate | 0.0
> {code}
> After cq is closed or stopped:
> {code:java}
> gfsh>show metrics --categories=query
> Cluster-wide Metrics
> Category |      Metric      | Value
> -------- | ---------------- | -----
> query    | activeCQCount    | -1
>          | queryRequestRate | 0.0
> {code}



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