1 Reply Latest reply on Aug 12, 2016 8:52 AM by Gustavo Fernandes

    Distributed Cache indexing issue

    xavier pradhap Newbie

      When I run a query to fetch data from the distributed cache , some times the value is not getting fetched . There is this issue in the indexing on the cache that is not giving me the proper values .

       

      Can some one help me to configure a proper distributed cache with indexing .

       

      My cache configuration is below .

       

      <distributed-cache name="sam" mode="SYNC" start="EAGER">

            <indexing index="LOCAL">

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

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

      <property name="lucene_version">LUCENE_CURRENT</property>

      <property name="default.chunk_size">128000</property>

            </indexing>

            <locking acquire-timeout="60000"/>

            <expiration lifespan="43200000"/>

            <state-transfer timeout="900000" await-initial-transfer="true" />

      </distributed-cache>


      Thanks

      (X)

        • 1. Re: Distributed Cache indexing issue
          Gustavo Fernandes Apprentice

          What is probably happening is that your "default" cache is LOCAL, and when the InfinispanIndexManager creates the index caches implicitly, they are also create as LOCAL,

          so effectively your index is not distributed, causing the effects you are observing (no results returned depending on where the query is executed).

          Please ensure the index caches are present with the right configuration:

          <distributed-cache name="sam" mode="SYNC" start="EAGER">

                <indexing index="LOCAL">

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

                      <property name="lucene_version">LUCENE_CURRENT</property>

                      <property name="default.chunk_size">128000</property>

                </indexing>

                <locking acquire-timeout="60000"/>

                <expiration lifespan="43200000"/>

                <state-transfer timeout="900000" await-initial-transfer="true" />

          </distributed-cache>

          <replicated-cache name="LuceneIndexesMetadata" mode="SYNC" remote-timeout="25000">

                <indexing index="NONE" />

          </replicated-cache>

          <distributed-cache name="LuceneIndexesData" mode="SYNC" remote-timeout="25000">

                <indexing index="NONE" />

          </distributed-cache>

          <replicated-cache name="LuceneIndexesLocking" mode="SYNC" remote-timeout="25000">

                <indexing index="NONE" />

          </replicated-cache>