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/08/03 09:26: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=17169848#comment-17169848 ] 

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

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