Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGNITE-2786 : SpringCache doesn't survive client reconnect #1688

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ryagnik
Copy link

@ryagnik ryagnik commented Mar 29, 2017

The fix can be applied as follows with SpringCacheManager -

  1. Design was to listen for ignite re connect event
  2. And clear the cache on reconnect
  3. Added logger to log reconnect information

See the following code below and let us know if this is helpful -

In afterPropertiesSet -

//Handles the reconnect event, on server crashes OR network failure, client
connects to server and
// destroy the cache
IgnitePredicate lsnr = iEvt -> {
U.warn(log,"Received discovery event [iEvt=" + iEvt.name() + ", discovery=" + iEvt.shortDisplay() + ']');

caches.keySet().forEach(key ->
{ ignite.destroyCache(key); caches.remove(key); }

);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants