1 Reply Latest reply on Aug 18, 2017 5:54 AM by Galder Zamarreño

    How do I configure infinispan in capedwarf for persistent store behavior?

    Jonathan Franchesco Torres Baca Newbie

      Hi, I'm Jonathan.

       

      I'm using capedwarf. Capedwarf(Wildfly) is a project that provides platform-like features as a Google App Engine service. Capedwarf uses Infinispan(Infinispan 6.x) to store the data. Everything works fine in an on / off environment of capedwarf, but when there are unexpected shutdowns of capedwarf or the server itself due to power outages, I have data loss in infinispan. I need infinispan sure to always write write to disk and prevent the loss of data. Please help me with the correct settings.

       

      I leave here the configuration in capedwarf for infinispan that is currently in use:

       

                ...

             <subsystem xmlns="urn:jboss:domain:infinispan:2.0">

                  <cache-container name="capedwarf" default-cache="default" module="org.infinispan.query"

                                   statistics-enabled="true">

                      <transport lock-timeout="60000"/>

                      <distributed-cache name="default" mode="SYNC">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LIRS" max-entries="100000"/>

                          <file-store preload="false" purge="false"/>

                          <indexing index="LOCAL">

                              <!-- Remove jndiname, backend

                              <property name="hibernate.search.default.indexmanager" value="org.infinispan.query.indexmanager.InfinispanIndexManager" />

                              -->

                              <property name="hibernate.search.default.exclusive_index_use">false</property>

                              <property name="hibernate.search.default.directory_provider">infinispan</property>

                              <property name="hibernate.search.infinispan.cachemanager_jndiname">

                                  java:jboss/infinispan/container/capedwarf

                              </property>

                              <property name="hibernate.search.default.worker.backend">jgroups</property>

                          </indexing>

                      </distributed-cache>

                      <distributed-cache name="datastore_versions" mode="SYNC">

                          <transaction mode="NON_XA" locking="OPTIMISTIC"/>

                          <locking isolation="REPEATABLE_READ"/>

                          <eviction strategy="LIRS" max-entries="100000"/>

                          <file-store preload="false" purge="false"/>

                      </distributed-cache>

                      <replicated-cache name="data" mode="SYNC">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LIRS" max-entries="10000"/>

                          <file-store preload="false" purge="false"/>

                      </replicated-cache>

                      <replicated-cache name="metadata" mode="SYNC">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LIRS" max-entries="10000"/>

                          <file-store preload="false" purge="false"/>

                      </replicated-cache>

                      <replicated-cache name="memcache" mode="SYNC" statistics-enabled="true">

                          <transaction mode="NON_XA" locking="PESSIMISTIC"/>

                          <eviction strategy="LIRS" max-entries="10000"/>

                          <!-- no file-store as explicitly no persistence -->

                      </replicated-cache>

                      <distributed-cache name="dist" mode="ASYNC">

                          <transaction mode="NON_XA" locking="PESSIMISTIC"/>

                          <eviction strategy="LIRS" max-entries="100000"/>

                          <file-store preload="false" purge="false"/>

                      </distributed-cache>

                      <distributed-cache name="tasks" mode="ASYNC">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LIRS" max-entries="10000"/>

                          <file-store preload="false" purge="false"/>

                          <indexing index="LOCAL">

                              <property name="hibernate.search.default.block_waiting_ack">false</property>

                              <property name="hibernate.search.default.exclusive_index_use">false</property>

                              <property name="hibernate.search.default.directory_provider">infinispan</property>

                              <property name="hibernate.search.infinispan.cachemanager_jndiname">

                                  java:jboss/infinispan/container/capedwarf

                              </property>

                              <property name="hibernate.search.default.worker.backend">jgroups</property>

                          </indexing>

                      </distributed-cache>

                      <distributed-cache name="search" mode="ASYNC">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LIRS" max-entries="10000"/>

                          <file-store preload="false" purge="false"/>

                          <indexing index="LOCAL">

                              <property name="hibernate.search.default.block_waiting_ack">false</property>

                              <property name="hibernate.search.default.exclusive_index_use">false</property>

                              <property name="hibernate.search.default.directory_provider">infinispan</property>

                              <property name="hibernate.search.infinispan.cachemanager_jndiname">

                                  java:jboss/infinispan/container/capedwarf

                              </property>

                              <property name="hibernate.search.default.worker.backend">jgroups</property>

                          </indexing>

                      </distributed-cache>

                      <distributed-cache name="prospective_search" mode="ASYNC">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LIRS" max-entries="10000"/>

                          <file-store preload="false" purge="false"/>

                          <indexing index="LOCAL">

                              <property name="hibernate.search.default.block_waiting_ack">false</property>

                              <property name="hibernate.search.default.exclusive_index_use">false</property>

                              <property name="hibernate.search.default.directory_provider">infinispan</property>

                              <property name="hibernate.search.infinispan.cachemanager_jndiname">

                                  java:jboss/infinispan/container/capedwarf

                              </property>

                              <property name="hibernate.search.default.worker.backend">jgroups</property>

                          </indexing>

                      </distributed-cache>

                      <distributed-cache name="logs" mode="ASYNC">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LIRS" max-entries="10000"/>

                          <file-store preload="false" purge="false"/>

                          <indexing index="LOCAL">

                              <property name="hibernate.search.default.block_waiting_ack">false</property>

                              <property name="hibernate.search.default.exclusive_index_use">false</property>

                              <property name="hibernate.search.default.directory_provider">infinispan</property>

                              <property name="hibernate.search.infinispan.cachemanager_jndiname">

                                  java:jboss/infinispan/container/capedwarf

                              </property>

                              <property name="hibernate.search.default.worker.backend">jgroups</property>

                          </indexing>

                      </distributed-cache>

                      <distributed-cache name="channel" mode="ASYNC">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LIRS" max-entries="10000"/>

                          <file-store preload="false" purge="false"/>

                          <indexing index="LOCAL">

                              <property name="hibernate.search.default.block_waiting_ack">false</property>

                              <property name="hibernate.search.default.exclusive_index_use">false</property>

                              <property name="hibernate.search.default.directory_provider">infinispan</property>

                              <property name="hibernate.search.infinispan.cachemanager_jndiname">

                                  java:jboss/infinispan/container/capedwarf

                              </property>

                              <property name="hibernate.search.default.worker.backend">jgroups</property>

                          </indexing>

                      </distributed-cache>

                      <replicated-cache name="LuceneIndexesMetadata" mode="SYNC">

                          <transaction mode="NONE"/>

                          <eviction strategy="NONE"/>

                          <file-store preload="true" purge="false"/>

                      </replicated-cache>

                      <replicated-cache name="LuceneIndexesData" mode="SYNC">

                          <transaction mode="NONE"/>

                          <eviction strategy="NONE"/>

                          <file-store preload="true" purge="false"/>

                      </replicated-cache>

                      <replicated-cache name="LuceneIndexesLocking" mode="SYNC">

                          <transaction mode="NONE"/>

                          <eviction strategy="NONE"/>

                      </replicated-cache>

                  </cache-container>

              </subsystem>

      ...