[ https://issues.apache.org/jira/browse/GEODE-8329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17155804#comment-17155804 ]
ASF GitHub Bot commented on GEODE-8329: --------------------------------------- agingade commented on a change in pull request #5360: URL: https://github.com/apache/geode/pull/5360#discussion_r453128596 ########## File path: geode-core/src/main/java/org/apache/geode/cache/client/internal/QueueManagerImpl.java ########## @@ -1112,7 +1112,8 @@ private void recoverCqs(Connection recoveredConnection, boolean isDurable) { .set(((DefaultQueryService) this.pool.getQueryService()).getUserAttributes(name)); } try { - if (((CqStateImpl) cqi.getState()).getState() != CqStateImpl.INIT) { + if (((CqStateImpl) cqi.getState()).getState() != CqStateImpl.INIT Review comment: Thanks for pointing "isDurable" as argument to the CQ API. I missed it. You are right, even though the client is durable the CQs and Interests doesn't have to be durable. Based on this condition either they need to be registered as durable or non-durable on durable client. If you look into, how the recoverCQ is performed, it is done in one go. Its not like register non-durable CQs first and durable CQs next. Please point me if I missed the code path. And looking at the code, looks like the durable value passed by user is ignored. The code change I suggested with "recoverAllInterestTypes" looks right. With additional code change in: ``` private void recoverCqs(Connection recoveredConnection, boolean isDurable) { - - // Change cqi.createOn(recoveredConnection, isDurable); // TO: cqi.createOn(recoveredConnection, (isDurable && cqi.isDurable()); } ``` Also, you may want to look at the "CreateCQOp.execute()" This is called when CQ is executed and while during redundancy-recovery. In case of execute, it seems to take the isDurable value set while creating the CQ into consideration not the client durability. Not sure if there are any additional mechanism in server side to know if its a durable client and only use the isDurable value passed during the CQ/interest creation. ---------------------------------------------------------------- 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 > Durable CQ not registered as durable after server failover > ---------------------------------------------------------- > > Key: GEODE-8329 > URL: https://issues.apache.org/jira/browse/GEODE-8329 > Project: Geode > Issue Type: Bug > Reporter: Jakov Varenina > Assignee: Jakov Varenina > Priority: Major > > {color:#172b4d}It seems that aftter server failover the java client is > wrongly re-registering CQ on new server as not durable. Command *list > durable-cq* prints that there are no durable CQ which is correct, since CQ is > wrongly registered by client as not durable and therefore following > printout:{color} > {code:java} > gfsh>list durable-cqs --durable-client-id=AppCounters > Member | Status | CQ Name > ------- | ------- | -------------------------------------------- > server1 | OK | randomTracker > server2 | IGNORED | No client found with client-id : AppCounters > server3 | IGNORED | No client found with client-id : AppCounters > > after shutdown of server1: > > gfsh>list durable-cqs --durable-client-id=AppCounters > Member | Status | CQ Name > ------- | ------- | > ----------------------------------------------------------- > server2 | IGNORED | No durable cqs found for durable-client-id : > "AppCounters". --> server2 is hosting CQ, but it is not flagged as durable > server3 | IGNORED | No client found with client-id : AppCounters{code} -- This message was sent by Atlassian Jira (v8.3.4#803005)