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