Hi Oleksandr,

Could you please check Ignite logs for messages were persistence directory
located?

When Ignite is started from code, it is possible that Ignite is not able to
locate IGNITE_WORK or IGNITE_HOME and creates work files in temp dir. Start
scripts always provide this setting, but in developer's environment it may
be missed.

Setting up work/home/persistenceStoreDir will probably help to locate data
files in configured place, so inserted data will be loaded always.

Sincerely,
Dmitriy Pavlov

вт, 6 мар. 2018 г. в 12:42, Olexandr K <olexandr.kundire...@gmail.com>:

> Hi Team,
>
> I'm trying to configure persistent cache.
>
> Specifically I need to cache key-value pairs and they should be also
> stored to persistent storage.
>
> Here is my configuration:
>
> [ignite.xml]
> ...
> <property name="cacheConfiguration">
>             <list>
>                 <bean
> class="org.apache.ignite.configuration.CacheConfiguration">
>                     <property name="name" value="Session"/>
>                     <property name="atomicityMode" value="TRANSACTIONAL"/>
>                     <property name="writeSynchronizationMode"
> value="FULL_SYNC"/>
>                     <property name="cacheMode" value="PARTITIONED"/>
>                     <property name="backups" value="0"/>
>                 </bean>
>             </list>
>         </property>
>
>         <property name="dataStorageConfiguration">
>             <bean
> class="org.apache.ignite.configuration.DataStorageConfiguration">
>                 <property name="defaultDataRegionConfiguration">
>                     <bean
> class="org.apache.ignite.configuration.DataRegionConfiguration">
>                         <property name="persistenceEnabled" value="true"/>
>                     </bean>
>                 </property>
>             </bean>
>         </property>
>
> Here is my client code:
>
> Ignition.setClientMode(true);
> ignite = Ignition.start("classpath:///ignite.xml");
> ignite.active(true);
> ...
> ignite.getSessionCache().put(key, value);
>
> I cannot get my data back after bouncing Ignite node.
> What I'm missing here?
>
> BR, Oleksandr
>

Reply via email to