[ https://issues.apache.org/jira/browse/GEODE-8329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17156682#comment-17156682 ]
ASF GitHub Bot commented on GEODE-8329: --------------------------------------- jvarenina commented on a change in pull request #5360: URL: https://github.com/apache/geode/pull/5360#discussion_r453607399 ########## 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 your comments! Related to the Interest recovery, I have tried following case: ``` Start three servers. Start client with following config: - redundnacy set to 0 - register non-durable Interests - configure durable id ``` After I shutdown primary server I expected that the client should register/recover Interests on the another running server. I have tried exactly same case with and without the code you suggested. What I have noticed that some steps are missing related to the recovery of non-durable Interest when using solution you suggested (please check logs below). Is this expected? without your code: ``` [debug 2020/07/13 13:56:37.574 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] SubscriptionManager redundancy satisfier - Non backup server was made primary. Recovering interest jakov:26486 [info 2020/07/13 13:56:37.574 CEST <Cache Client Updater Thread on 192.168.1.101(12538)<v4>:41002 port 26486> tid=0x5b] Cache Client Updater Thread on 192.168.1.101(12538)<v4>:41002 port 26486 (jakov:26486) : ready to process messages. [debug 2020/07/13 13:56:37.576 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] org.apache.geode.cache.client.internal.QueueManagerImpl@69610f07.recoverSingleRegion starting kind=KEY region=/HAInterestBaseTest_region: {k1=KEYS, k2=KEYS} [debug 2020/07/13 13:56:37.576 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] registerInterestsStarted: new count = 1 [debug 2020/07/13 13:56:37.578 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] localDestroyNoCallbacks key=k2 [debug 2020/07/13 13:56:37.579 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] basicDestroyPart2: k2, version=null [debug 2020/07/13 13:56:37.580 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] VersionedThinRegionEntryHeapStringKey1@1f47aafa (key=k2; rawValue=REMOVED_PHASE1; version={v1; rv2; mbr=192.168.1.101(12538)<v4>:41002; time=1594641397170};member=192.168.1.101(12538)<v4>:41002) dispatching event EntryEventImpl[op=LOCAL_DESTROY;region=/HAInterestBaseTest_region;key=k2;callbackArg=null;originRemote=false;originMember=jakov(12395:loner):57906:02b10848] [debug 2020/07/13 13:56:37.580 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] localDestroyNoCallbacks key=k1 [debug 2020/07/13 13:56:37.580 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] basicDestroyPart2: k1, version=null [debug 2020/07/13 13:56:37.580 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] VersionedThinRegionEntryHeapStringKey1@5ecf6c9c (key=k1; rawValue=REMOVED_PHASE1; version={v1; rv1; mbr=192.168.1.101(12538)<v4>:41002; time=1594641397148};member=192.168.1.101(12538)<v4>:41002) dispatching event EntryEventImpl[op=LOCAL_DESTROY;region=/HAInterestBaseTest_region;key=k1;callbackArg=null;originRemote=false;originMember=jakov(12395:loner):57906:02b10848] [debug 2020/07/13 13:56:37.580 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] org.apache.geode.cache.client.internal.QueueManagerImpl@69610f07.recoverSingleRegion :Endpoint recovered is primary so clearing the keys of interest starting kind=KEY region=/HAInterestBaseTest_region: [k1, k2] [debug 2020/07/13 13:56:37.584 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] org.apache.geode.internal.cache.LocalRegion[path='/HAInterestBaseTest_region';scope=LOCAL';dataPolicy=NORMAL; concurrencyChecksEnabled] refreshEntriesFromServerKeys count=2 policy=KEYS k1 k2 [debug 2020/07/13 13:56:37.584 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] refreshEntries region=/HAInterestBaseTest_region [debug 2020/07/13 13:56:37.585 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] registerInterestCompleted: new value = 0 [debug 2020/07/13 13:56:37.585 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] registerInterestCompleted: Signalling end of register-interest [debug 2020/07/13 13:56:37.586 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] Primary recovery not needed ``` with your code: ``` [debug 2020/07/13 13:44:20.028 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] SubscriptionManager redundancy satisfier - Non backup server was made primary. Recovering interest jakov:28101 [info 2020/07/13 13:44:20.028 CEST <Cache Client Updater Thread on 192.168.1.101(11053)<v4>:41002 port 28101> tid=0x5b] Cache Client Updater Thread on 192.168.1.101(11053)<v4>:41002 port 28101 (jakov:28101) : ready to process messages. [debug 2020/07/13 13:44:20.030 CEST <queueTimer-HAInterestBaseTestPool1> tid=0x5a] Primary recovery not needed ``` ---------------------------------------------------------------- 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)