Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Hi,
We observed an issue with geode client re-connection and cache synchronization. We have a caching client region. In this region we register interest for keys (could be .*). Now, when client is reconnecting with the server, at that exact period, client region loses it's data. That's until it is repopulated again with interest registration calls and cache sync up. Looking QueueManagerImpl.recoverSingleKey,
and when primary endpoint recovered, it
issues Region.clearKeysOfInterest then eventually calls
case InterestType.KEY:
if (key instanceof String && key.equals("ALL_KEYS")) {
clearViaRegEx(".*");
...
for (Object o : entrySet(false)) {
...
localDestroyNoCallbacks(entryKey);
This is really unexpected behavior and impossible to deal with. Everyone
would have to either create local disconnected region paired with proxy
empty region and forward events. Or always call keySetOnServer.
In addition, there is no way to know that the region is in this intermediate state. There is kind of cache global callback, but that's too global:
private void recoverAllInterestTypes(final Connection recoveredConnection, boolean isFirstNewConnection) {
if (PoolImpl.BEFORE_RECOVER_INTEREST_CALLBACK_FLAG) {
ClientServerObserver bo = ClientServerObserverHolder.getInstance(); bo.beforeInterestRecovery(); }
What can be done to solve this race condition of not having expected data or having incomplete cache data?
Thank you