Hello!

Ignite will use existing cache configuration if cache is already present.
There's nothing you can do here. This includes the cache store.

However, the cache store may determine what to keep in its serialized form,
and what to re-read/infer every time it is started. So as I have said,
you may improve Cassandra cache store to track environment changes.

Regards,

-- 
Ilya Kasnacheev


вт, 5 янв. 2021 г. в 04:38, xmw45688 <xw...@procurant.com>:

> Hi Ilya,
>
> Thanks for your guidance and happy new year!  Sorry for late catchup.
>
> You are right, Ignite Native Persistence does track the changes in class
> definition for "Ignite Native Persistence".  But the configuration to load
> data from Cache to Cassandra store is stored in xml configuration file.
> This configuration xml file is passed at runtime (see the example
> configuration below). When ignite server is stopped, the cache
> configuration
> is gone, not stored in the any place as far as I understand.  When the
> Ignite is restarted, the new xml is passed, there is no previous
> configuration for the old class definition in the xml configuration.
>
> My question - how/where does the ignite server get/read the old class
> definition if this class definition is provided in the most recent xml
> config file?
>
> So what I said is that the Cassandra Store implementation may not need to
> change.  It's the call that reads the xml configuration and stores the data
> in Cassandra Store via Ignite Cache.   If I remove Ignite Native
> configuration ("persistenceEnabled" value="false"), then Ignite server uses
> the xml configuration file passed at runtime.  The Ignite Cache has all new
> class definiton.
>
> I'd like your help to guide me make the changes to read the xml
> configuration at runtime instead of reading the previously cached
> configuration.
>
>
>     <bean id="catalog_uom_persistence_settings"
>
> class="org.apache.ignite.cache.store.cassandra.persistence.KeyValuePersistenceSettings">
>         <constructor-arg type="java.lang.String">
>             <value>
>             </value>
>         </constructor-arg>
>     </bean>
>
>         <bean
> class="org.apache.ignite.configuration.DataStorageConfiguration">
>
>                 <property name="defaultDataRegionConfiguration">
>                         <bean
> class="org.apache.ignite.configuration.DataRegionConfiguration">
>                                 <property name="name"
> value="Default_Region"/>
>                                 <property name="initialSize" value="#{10L
> * 1024 * 1024}"/>
>
>                                 <property name="maxSize" value="#{2L *
> 1024 * 1024 * 1024}"/>
>
>
>                                 <property name="persistenceEnabled"
> value="true"/>
>                         </bean>
>                 </property>
>         </bean>
>
>         <bean class="org.apache.ignite.configuration.CacheConfiguration">
>                 <property name="name" value="Uom"/>
>                 <property name="atomicityMode" value="TRANSACTIONAL"/>
>                 <property name="cacheMode" value="REPLICATED"/>
>                 <property name="readThrough" value="true"/>
>                 <property name="writeThrough" value="false"/>
>                 <property name="sqlSchema" value="catalog"/>
>                 <property name="indexedTypes">
>                         <list>
>                                 <value
> type="java.lang.Class">java.lang.String</value>
>                                 <value
> type="java.lang.Class">com.procurant.catalog.entity.Uom</value>
>                         </list>
>                 </property>
>                 <property name="cacheStoreFactory">
>                         <bean
> class="org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory">
>                                 <property name="dataSource"
> ref="cassandra"/>
>                                 <property name="persistenceSettingsBean"
> value="catalog_uom_persistence_settings"></property>
>                         </bean>
>                 </property>
>         </bean>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Reply via email to