You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by slut_hunter <da...@gmail.com> on 2019/11/06 09:23:34 UTC
Persistence store
Good afternoon. Help me please. I use a cluster of 3 nodes 2,7,6 with the
settings <property name = "persistenceEnabled" value = "true" />
but if I turn off 1 node and turn it back on, the cluster does not restore
the cache from the storage
There is 1 warning in the logs Persistence store is configured, but both
read-through and write-through are disabled.
Tell me how to properly restore the cache from storage.
Full config:
Java client example:
String cacheName = ContactRepository.prepareCacheName(orgId);
CacheConfiguration cacheConfig = new CacheConfiguration(cacheName);
cacheConfig.setCacheMode(CacheMode.PARTITIONED);
cacheConfig.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
cacheConfig.setBackups(0);
ContactCassandraCacheStoreExFactory factory = new
ContactCassandraCacheStoreExFactory();
factory.setDataSource(cassandraSource);
factory.setThreadsCount(4);
factory.setCacheName(cacheName);
factory.setLoadCacheConfig(new LoadCacheConfig(keyspace, table));
cacheConfig.setCacheStoreFactory(factory);
cacheConfig.setIndexedTypes(Integer.class, ContactDto.class);
IgniteConfiguration cfg = new IgniteConfiguration();
// Ignite persistence configuration.
DataStorageConfiguration storageCfg = new
DataStorageConfiguration();
storageCfg.getDefaultDataRegionConfiguration().setPersistenceEnabled(true);
cfg.setDataStorageConfiguration(storageCfg);
cfg.setIgniteInstanceName("springDataNode");
cfg.setWorkDirectory("/tmp/ignite");
cfg.setClientMode(clientMode);
cfg.setPeerClassLoadingEnabled(true);
cfg.setMetricsLogFrequency(0);
cfg.setFailureDetectionTimeout(560_000);
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Persistence store
Posted by slut_hunter <da...@gmail.com>.
The problem was that instead StatefulSet I used Deployment
Thanks for the help
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Persistence store
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
[2019-11-06 13:18:39,466][INFO ][main][GridCacheDatabaseSharedManager]
Checking memory state [lastValidPos=FileWALPointer [idx=0, fileOff=0,
len=0], lastMarked=FileWALPointer [idx=0, fileOff=0, len=0],
lastCheckpointId=00000000-0000-0000-0000-000000000000]
[2019-11-06 13:18:39,483][INFO ][main][GridCacheDatabaseSharedManager]
Applying lost cache updates since last checkpoint record
[lastMarked=FileWALPointer [idx=0, fileOff=0, len=0],
lastCheckpointId=00000000-0000-0000-0000-000000000000]
[2019-11-06 13:18:39,484][INFO ][main][GridCacheDatabaseSharedManager]
Finished applying WAL changes [updatesApplied=0, time=0ms]
I think this means you did not have any pre-existing persistence data on
that node after restart. Moreover, it seems that page store directory is
different. Are you sure that you did not clear
/opt/ignite/apache-ignite/work between restarts? What does it contain
currently?
Regards,
--
Ilya Kasnacheev
ср, 6 нояб. 2019 г. в 16:28, slut_hunter <da...@gmail.com>:
> In this screenshot, we see 3 nodes with a full cache.
> <http://apache-ignite-users.70518.x6.nabble.com/file/t2666/befor_stop.png>
>
>
> In this screenshot, we see 3 nodes after restarting one.
> <http://apache-ignite-users.70518.x6.nabble.com/file/t2666/after_start.png>
>
>
>
> Node log before restart
> befor_stop.log
> <http://apache-ignite-users.70518.x6.nabble.com/file/t2666/befor_stop.log>
>
>
>
> Node log after restart
> after_start.log
> <http://apache-ignite-users.70518.x6.nabble.com/file/t2666/after_start.log>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: Persistence store
Posted by slut_hunter <da...@gmail.com>.
In this screenshot, we see 3 nodes with a full cache.
<http://apache-ignite-users.70518.x6.nabble.com/file/t2666/befor_stop.png>
In this screenshot, we see 3 nodes after restarting one.
<http://apache-ignite-users.70518.x6.nabble.com/file/t2666/after_start.png>
Node log before restart
befor_stop.log
<http://apache-ignite-users.70518.x6.nabble.com/file/t2666/befor_stop.log>
Node log after restart
after_start.log
<http://apache-ignite-users.70518.x6.nabble.com/file/t2666/after_start.log>
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Persistence store
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
It should be restored from persistent store. Can you provide logs from
nodes? Are you sure you don't clear persistence dirs between restarts?
Regards,
--
Ilya Kasnacheev
ср, 6 нояб. 2019 г. в 15:09, slut_hunter <da...@gmail.com>:
> From Persistent store.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: Persistence store
Posted by slut_hunter <da...@gmail.com>.
From Persistent store.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Persistence store
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
Since you have two storages (Persistent store and Cassandra) I would like
to ask which one you are expecting to be restored from?
Regards,
--
Ilya Kasnacheev
ср, 6 нояб. 2019 г. в 12:23, slut_hunter <da...@gmail.com>:
> Good afternoon. Help me please. I use a cluster of 3 nodes 2,7,6 with the
> settings <property name = "persistenceEnabled" value = "true" />
> but if I turn off 1 node and turn it back on, the cluster does not restore
> the cache from the storage
> There is 1 warning in the logs Persistence store is configured, but both
> read-through and write-through are disabled.
> Tell me how to properly restore the cache from storage.
>
> Full config:
>
>
> Java client example:
> String cacheName =
> ContactRepository.prepareCacheName(orgId);
> CacheConfiguration cacheConfig = new CacheConfiguration(cacheName);
> cacheConfig.setCacheMode(CacheMode.PARTITIONED);
> cacheConfig.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
>
> cacheConfig.setBackups(0);
> ContactCassandraCacheStoreExFactory factory = new
> ContactCassandraCacheStoreExFactory();
> factory.setDataSource(cassandraSource);
> factory.setThreadsCount(4);
> factory.setCacheName(cacheName);
> factory.setLoadCacheConfig(new LoadCacheConfig(keyspace, table));
> cacheConfig.setCacheStoreFactory(factory);
> cacheConfig.setIndexedTypes(Integer.class, ContactDto.class);
> IgniteConfiguration cfg = new IgniteConfiguration();
> // Ignite persistence configuration.
> DataStorageConfiguration storageCfg = new
> DataStorageConfiguration();
>
> storageCfg.getDefaultDataRegionConfiguration().setPersistenceEnabled(true);
> cfg.setDataStorageConfiguration(storageCfg);
> cfg.setIgniteInstanceName("springDataNode");
> cfg.setWorkDirectory("/tmp/ignite");
>
> cfg.setClientMode(clientMode);
> cfg.setPeerClassLoadingEnabled(true);
>
> cfg.setMetricsLogFrequency(0);
> cfg.setFailureDetectionTimeout(560_000);
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>