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

Denis Magda commented on IGNITE-2394:
-------------------------------------

Hi, sorry for the delay.

1. Please update to the latest version on the master and modify the following 
code from {{GridCacheAdapter.globalLoadCacheAsync}} to the usage of 
{{cacheDataNode}} predicate

{noformat}
ClusterGroup newNodesV2 = 
ctx.kernalContext().grid().cluster().forCacheNodes(ctx.name())
            .forPredicate(new IgnitePredicate<ClusterNode>() {
                @Override public boolean apply(ClusterNode node) {
                    return 
node.version().compareToIgnoreTimestamp(LOAD_CACHE_JOB_V2_SINCE) >= 0;
                }
            });
{noformat}

2. There is no need to introduce new test suite class, you can add all required 
tests into 
{{org.apache.ignite.internal.processors.cache.CacheClientStoreSelfTest}}.

3. In regards to the tests you has to check that {{load}} method is not called 
in your {{TestStore}} implementation during execution of the tests that check 
replicated and partitioned caches. This is the main point because there mustn't 
be any preloading in case of replicated and partitioned caches on the client 
side since the client can't hold data for this caches.

4. Organize all your changes on your personal branch, create a pull-request and 
validate the you haven't broken anything using TeamCity. Refer to this doc for 
more info 
https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-1.CreateGitHubpull-request

> Cache loading from storage is called on client nodes
> ----------------------------------------------------
>
>                 Key: IGNITE-2394
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2394
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 1.5.0.final
>            Reporter: Denis Magda
>            Assignee: Alper Tekinalp
>            Priority: Critical
>              Labels: newbie
>             Fix For: 1.6
>
>         Attachments: LocalLoadTest.java, master_186c860_IGNITE-2394.patch, 
> master_baa1312_IGNITE-2394.patch
>
>
> If to call cache.loadCache(...) then the loading from a storage will happen 
> on all the nodes including client nodes.
> However, client nodes must be filtered out.
> If to be more precise at least this place of the code has to be modified
> {noformat}
>     IgniteInternalFuture<?> globalLoadCacheAsync(@Nullable 
> IgniteBiPredicate<K, V> p, @Nullable Object... args)
>         throws IgniteCheckedException {
>         ClusterGroup nodes = 
> ctx.kernalContext().grid().cluster().forCacheNodes(ctx.name());
> {noformat}
> where forDataNodes() has to be used instead of forCacheNodes().
> Also additional tests have to be added.
> Discussion on the user list:
> http://apache-ignite-users.70518.x6.nabble.com/Loadcache-behavior-tp2571.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to