[infinispan-issues] [JBoss JIRA] (ISPN-4599) InfinispanIndexManager locks held when primary node change

Gustavo Fernandes (JIRA) issues at jboss.org
Fri Aug 1 11:56:29 EDT 2014


Gustavo Fernandes created ISPN-4599:
---------------------------------------

             Summary: InfinispanIndexManager locks held when primary node change
                 Key: ISPN-4599
                 URL: https://issues.jboss.org/browse/ISPN-4599
             Project: Infinispan
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Embedded Querying, Remote Querying
    Affects Versions: 7.0.0.Alpha5
            Reporter: Gustavo Fernandes
            Assignee: Sanne Grinovero


Given the following configuration:
{code:xml}
<cache-container name="store" default-cache="default" statistics="true">
        <transport cluster="Infinispan-Query-Cluster"/>
        <!-- *************************************** -->
        <!--  Default Cache, with indexing enabled.  -->
        <!-- *************************************** -->
        <replicated-cache name="passivation" mode="SYNC" remote-timeout="20000" statistics="true">
            <indexing index="LOCAL">
                <property name="hibernate.search.default.indexmanager">
                    org.infinispan.query.indexmanager.InfinispanIndexManager
                </property>
                <property name="hibernate.search.default.directory_provider">infinispan</property>
            </indexing>
        </replicated-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>
    </cache-container>
{code}

Scenario:
- Start Node 1
- Insert a few @Indexed objects in the cache
- Start Node 2
- Insert a few @Indexed objects in the cache

Node 2 cannot acquire the locks to write and throws errors:
{code}
org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask applyUpdates
ERROR: HSEARCH000072: Couldn't open the IndexWriter because of previous error: operation skipped, index ouf of sync!
Aug 01, 2014 4:48:23 PM org.hibernate.search.exception.impl.LogErrorHandler handleException
ERROR: HSEARCH000058: Exception occurred org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: org.infinispan.lucene.locking.BaseLuceneLock at 2c1e889f
{code}

During the insertion on Node1, the InfinispanCommandsBackend  elects Node 1 as the primary node (since it's the only one) and acquires the lock on the LuceneIndexesLocking.
When node 2 joins and the topology changes, the InfinispanCommandsBackend elects Node 2 as the primary node, but it fails to acquire the lock (held by Node 1)



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the infinispan-issues mailing list