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

Sarunas Valaskevicius edited comment on IGNITE-12805 at 3/20/20, 7:49 PM:
--------------------------------------------------------------------------

Hi [~slava.koptilin] ,

yes, the idea is that ignite would pull data from the remote storage on demand 
(first use), and start managing it from that point onwards within the service 
context, pushing it back for sharing (across services) and backup purposes. the 
config:
{code:java}
val cfg = new CacheConfiguration[String, BinaryObject](s"name")
cfg.setBackups(1)
cfg.setCacheMode(CacheMode.PARTITIONED)
cfg.setAtomicityMode(CacheAtomicityMode.ATOMIC)
cfg.setGroupName(s"name")
cfg.setDataRegionName("name")

cfg.setReadThrough(true)
cfg.setCacheLoaderFactory(new CachedEntityStorage.CacheLoaderFactory(...))
cfg.setWriteThrough(true)
cfg.setCacheWriterFactory(new CachedEntityStorage.CacheWriterFactory(...))
cfg.setWriteBehindEnabled(true)
cfg.setWriteBehindCoalescing(true)
cfg.setWriteBehindFlushSize(0)
cfg.setWriteBehindFlushFrequency(1000)
cfg.setWriteBehindFlushThreadCount(2)
cfg.setWriteBehindBatchSize(32)
cfg.setStoreKeepBinary(true)
 {code}
 

the region is configured with persistence=true on all ignite server nodes

 

Thanks for looking into this!


was (Author: sarunas):
Hi [~slava.koptilin] ,

yes, the idea is that ignite would pull data from the remote storage on demand, 
and start managing it from that point onwards within the service context, 
pushing it back for sharing (across services) and backup purposes. the config:


{code:java}
val cfg = new CacheConfiguration[String, BinaryObject](s"name")
cfg.setBackups(1)
cfg.setCacheMode(CacheMode.PARTITIONED)
cfg.setAtomicityMode(CacheAtomicityMode.ATOMIC)
cfg.setGroupName(s"name")
cfg.setDataRegionName("name")

cfg.setReadThrough(true)
cfg.setCacheLoaderFactory(new CachedEntityStorage.CacheLoaderFactory(...))
cfg.setWriteThrough(true)
cfg.setCacheWriterFactory(new CachedEntityStorage.CacheWriterFactory(...))
cfg.setWriteBehindEnabled(true)
cfg.setWriteBehindCoalescing(true)
cfg.setWriteBehindFlushSize(0)
cfg.setWriteBehindFlushFrequency(1000)
cfg.setWriteBehindFlushThreadCount(2)
cfg.setWriteBehindBatchSize(32)
cfg.setStoreKeepBinary(true)
 {code}
 

the region is configured with persistence=true on all ignite server nodes

 

Thanks for looking into this!

> Node fails to restart
> ---------------------
>
>                 Key: IGNITE-12805
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12805
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: 2.8
>            Reporter: Sarunas Valaskevicius
>            Assignee: Vyacheslav Koptilin
>            Priority: Blocker
>
> 1. nodes have default persistence false, but there is a cache region with 
> persistence on.
> 2. a cluster starts ok with ignite data directory clean
> 3. but when the nodes are restarted, they fail and can never join the cluster 
> again:
>  
> {code:java}
> 12:352020-03-19_13:34:30.273 [main-0] ERROR 
> o.a.ignite.internal.IgniteKernal:137 <> - Exception during start processors, 
> node will be stopped and close connections
> java.lang.NullPointerException: null
>         at 
> org.apache.ignite.internal.processors.cache.GridCacheUtils.affinityNode(GridCacheUtils.java:1374)
>         at 
> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$CachePredicate.dataNode(GridDiscoveryManager.java:3205)
>         at 
> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.cacheAffinityNode(GridDiscoveryManager.java:1894)
>         at 
> org.apache.ignite.internal.processors.cache.ValidationOnNodeJoinUtils.validate(ValidationOnNodeJoinUtils.java:330)
>         at 
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCacheContext(GridCacheProcessor.java:1201)
>         at 
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCacheInRecoveryMode(GridCacheProcessor.java:2291)
>         at 
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.access$1700(GridCacheProcessor.java:202)
>         at 
> org.apache.ignite.internal.processors.cache.GridCacheProcessor$CacheRecoveryLifecycle.afterBinaryMemoryRestore(GridCacheProcessor.java:5387)
>         at 
> org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.restoreBinaryMemory(GridCacheDatabaseSharedManager.java:1075)
>         at 
> org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.startMemoryRestore(GridCacheDatabaseSharedManager.java:2068)
>         at 
> org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1254)
>         at 
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2038)
>         at 
> org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1703)
>         at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1117)
>         at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:637) 
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to