Hi there,
i'm trying to get MassIndexer running on a Hibernate Search (v5.6.3.Final) cluster. I'm using JGroups with automatic master election strategy as worker backend (
http://docs.jboss.org/hibernate/search/ ... ps-backend -> 3.4.2.3. Automatic master election).
If i try to run a MassIndexer on a slave node, it fails with a LockException (as already mentioned in the Tip at the end of the Automatic Master Election topic: ...Also optimisation and MassIndexer operations need to be triggered on the master node...):
Code:
2017-10-23 13:48:26,468 ERROR [org.hibernate.search.backend.impl.lucene.LuceneBackendTaskStreamer] (default task-14) HSEARCH000072: Couldn't open the IndexWriter because of previous error: operation skipped, index ouf of sync!
2017-10-23 13:48:26,483 ERROR [org.hibernate.search.exception.impl.LogErrorHandler] (default task-14) HSEARCH000058: HSEARCH000117: IOException on the IndexWriter: org.apache.lucene.store.LockObtainFailedException: lock instance already assigned
at org.infinispan.lucene.impl.CommonLockObtainUtils.failLockAcquire(CommonLockObtainUtils.java:33)
at org.infinispan.lucene.impl.CommonLockObtainUtils.attemptObtain(CommonLockObtainUtils.java:20)
at org.infinispan.lucene.impl.BaseLockFactory.obtainLock(BaseLockFactory.java:35)
at org.infinispan.lucene.impl.BaseLockFactory.obtainLock(BaseLockFactory.java:18)
at org.infinispan.lucene.impl.DirectoryLucene.obtainLock(DirectoryLucene.java:152)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:776)
at org.hibernate.search.backend.impl.lucene.IndexWriterHolder.createNewIndexWriter(IndexWriterHolder.java:126)
at org.hibernate.search.backend.impl.lucene.IndexWriterHolder.getIndexWriter(IndexWriterHolder.java:92)
at org.hibernate.search.backend.impl.lucene.IndexWriterHolder.getIndexWriter(IndexWriterHolder.java:111)
at org.hibernate.search.backend.impl.lucene.AbstractWorkspaceImpl.getIndexWriter(AbstractWorkspaceImpl.java:113)
at org.hibernate.search.backend.impl.lucene.AbstractWorkspaceImpl.getIndexWriterDelegate(AbstractWorkspaceImpl.java:214)
at org.hibernate.search.backend.impl.lucene.LuceneBackendTaskStreamer.doWork(LuceneBackendTaskStreamer.java:44)
at org.hibernate.search.backend.impl.lucene.WorkspaceHolder.applyStreamWork(WorkspaceHolder.java:74)
at org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.performStreamOperation(DirectoryBasedIndexManager.java:103)
at org.hibernate.search.backend.impl.batch.DefaultBatchBackend.flush(DefaultBatchBackend.java:87)
at org.hibernate.search.batchindexing.impl.BatchCoordinator.afterBatch(BatchCoordinator.java:148)
at org.hibernate.search.batchindexing.impl.BatchCoordinator.runWithErrorHandler(BatchCoordinator.java:98)
at org.hibernate.search.batchindexing.impl.ErrorHandledRunnable.run(ErrorHandledRunnable.java:32)
at org.hibernate.search.batchindexing.impl.MassIndexerImpl.startAndWait(MassIndexerImpl.java:213)
Question:
Is there any way, to let the MassIndexer delegate it's indexing work to the current master node?
Any help is much appreciated as this is currently a blocker for my use case.
Thanks,
Benedikt