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

Kristian Rosenvold edited comment on IGNITE-3357 at 6/23/16 7:45 AM:
---------------------------------------------------------------------

There is a fairly simple workaround, instead of using loadCache use a data 
streamer. As far as my testing has shown, this does not have the same problem.

{code}
//                      cache.loadCache((k, v) -> true, Integer.MAX_VALUE);
final CacheStore<? super K, ? super V> cacheStore = 
cacheConfiguration.getCacheStoreFactory().create();
try (IgniteDataStreamer<Object, Object> streamer = 
ignite.dataStreamer(cacheConfiguration.getName())) {
   streamer.allowOverwrite(false);
   cacheStore.loadCache(streamer::addData, Integer.MAX_VALUE);
}
{code}



was (Author: krosenvold):
There is a fairly simple workaround, instead of using loadCache use a data 
streamer. As far as my testing has shown, this does not have the same problem.

{code}
//                      cache.loadCache((k, v) -> true, Integer.MAX_VALUE);
                        final CacheStore<? super K, ? super V> cacheStore = 
cacheConfiguration.getCacheStoreFactory().create();
                        try (IgniteDataStreamer<Object, Object> streamer = 
ignite.dataStreamer(cacheConfiguration.getName())) {
                                streamer.allowOverwrite(false);
                                cacheStore.loadCache(streamer::addData, 
Integer.MAX_VALUE);
                        }
{code}


> getOrCreateCache on second node fails replication if first node is doing 
> loadCache
> ----------------------------------------------------------------------------------
>
>                 Key: IGNITE-3357
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3357
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 1.6, 1.7
>            Reporter: Kristian Rosenvold
>
> If the first node on a REPLICATED cache is doing loadCache, a subsequent node 
> that starts while this operation is in process will not reach identical state 
> as the first node.



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

Reply via email to