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

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_r452538829



##########
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:
       The value for "isDurable" is passed by the caller. If you look into the 
only caller of this method; it calls the "recoverCQs" twice if the client is 
durable, with isDurable value as true. Not sure why its doing twice...
   
   This method is also called while satisfying the redundancy-level, which is 
not related to client durability.
   Say if the redundancy is set to 5 and there are only 3 servers available; 
when a new server is added to the cluster this code is executed to satisfy the 
redundancy. You could try adding test scenario for this.
   
   Also, isDurable is the meta-info sent to server to say if its durable client 
(in this context).
   
   In QueueManagerImpl can you try changing the following method:
   ` private void recoverAllInterestTypes(final Connection recoveredConnection,
         boolean isFirstNewConnection) {
       if (PoolImpl.BEFORE_RECOVER_INTEREST_CALLBACK_FLAG) {
         ClientServerObserver bo = ClientServerObserverHolder.getInstance();
         bo.beforeInterestRecovery();
       }
       recoverInterestList(recoveredConnection, false, true, 
isFirstNewConnection);
       recoverInterestList(recoveredConnection, false, false, 
isFirstNewConnection);
       recoverCqs(recoveredConnection, false);
       if (getPool().isDurableClient()) {
         recoverInterestList(recoveredConnection, true, true, 
isFirstNewConnection);
         recoverInterestList(recoveredConnection, true, false, 
isFirstNewConnection);
         recoverCqs(recoveredConnection, true);
       }
     }
   
   TO:
   
    private void recoverAllInterestTypes(final Connection recoveredConnection,
         boolean isFirstNewConnection) {
       if (PoolImpl.BEFORE_RECOVER_INTEREST_CALLBACK_FLAG) {
         ClientServerObserver bo = ClientServerObserverHolder.getInstance();
         bo.beforeInterestRecovery();
       }
   
       boolean isDurableClient = getPool().isDurableClient();
       recoverInterestList(recoveredConnection, isDurableClient, true, 
isFirstNewConnection);
       recoverInterestList(recoveredConnection, isDurableClient, false, 
isFirstNewConnection);
       recoverCqs(recoveredConnection, isDurableClient);
     }`
   




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

Reply via email to