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:
[email protected]