ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-2786) SpringCache doesn't survive client reconnect
Date Wed, 29 Mar 2017 03:17:42 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-2786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15946460#comment-15946460

ASF GitHub Bot commented on IGNITE-2786:

GitHub user ryagnik opened a pull request:


    IGNITE-2786 : SpringCache doesn't survive client reconnect

    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<DiscoveryEvent> lsnr = iEvt -> {
    U.warn(log,"Received discovery event [iEvt=" + iEvt.name() + ", discovery=" + iEvt.shortDisplay()
+ ']');
    caches.keySet().forEach(key ->
    { ignite.destroyCache(key); caches.remove(key); }

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ryagnik/ignite IGNITE-2786

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1688
commit 9cb6a2cc722989d9e9752aad67f5843d028e07f1
Author: Rishi Yagnik <ryagnik@pdxinc.com>
Date:   2017-03-29T02:44:21Z

    IGNITE-2786 : Fix Spring Client reconnect issue using reconnect event mechanism.


> SpringCache doesn't survive client reconnect
> --------------------------------------------
>                 Key: IGNITE-2786
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2786
>             Project: Ignite
>          Issue Type: Improvement
>          Components: cache
>    Affects Versions: 1.5.0.final
>            Reporter: Valentin Kulichenko
>            Assignee: Rishi
>             Fix For: 2.0
> After a client disconnects and reconnects with new ID, Spring caching can't be used,
because existing cache instance are closed.

This message was sent by Atlassian JIRA

View raw message