How to configure JDG for indexing and queries

Solution Verified - Updated -

Issue

  • What need to be configured if I want to use Indexing and Queries with JDG in client/server mode?
  • If I run queries from a HotRod standalone client I see different results if the query is loadbalanced and hit different nodes
  • I have a two node cluster and a HotRod client which add content to the cache, but if I run a query directly afterwards I did not see this added content
  • Configured clustered caches (distributed or replicate) does not share or replicate the index correct, what is wrong with the configuration?
  • How to configure indexing for datagrid queries correctly if the caches are clustered?
  • There are errors within the logfiles if the distributed-cache is in mode=ASYNC, what is the reason?
ERROR [org.hibernate.search.exception.impl.LogErrorHandler] (Hibernate Search sync consumer thread for index org.infinispan.search.MyGridObject) HSEARCH000058: HSEARCH000117: IOException on the IndexWriter: java.io.IOException: Read past EOF
        at org.infinispan.lucene.impl.SlicedBufferIndexInput.readByte(SlicedBufferIndexInput.java:64)
        at org.apache.lucene.store.DataInput.readInt(DataInput.java:101)
        at org.apache.lucene.codecs.CodecUtil.checkHeader(CodecUtil.java:194)
        at org.apache.lucene.codecs.CodecUtil.checkIndexHeader(CodecUtil.java:255)
        at org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.<init>(Lucene50PostingsReader.java:86)
        at org.apache.lucene.codecs.lucene50.Lucene50PostingsFormat.fieldsProducer(Lucene50PostingsFormat.java:443)
        at org.apache.lucene.codecs.perfield.PerFieldPostingsFormat$FieldsReader.<init>(PerFieldPostingsFormat.java:261)
        at org.apache.lucene.codecs.perfield.PerFieldPostingsFormat.fieldsProducer(PerFieldPostingsFormat.java:341)
        at org.apache.lucene.index.SegmentCoreReaders.<init>(SegmentCoreReaders.java:104)
        at org.apache.lucene.index.SegmentReader.<init>(SegmentReader.java:65)
        at org.apache.lucene.index.ReadersAndUpdates.getReader(ReadersAndUpdates.java:145)
        at org.apache.lucene.index.BufferedUpdatesStream$SegmentState.<init>(BufferedUpdatesStream.java:385)
        at org.apache.lucene.index.BufferedUpdatesStream.openSegmentStates(BufferedUpdatesStream.java:417)
        at org.apache.lucene.index.BufferedUpdatesStream.applyDeletesAndUpdates(BufferedUpdatesStream.java:262)
        at org.apache.lucene.index.IndexWriter.applyAllDeletesAndUpdates(IndexWriter.java:3161)
        at org.apache.lucene.index.IndexWriter.maybeApplyDeletes(IndexWriter.java:3147)
        at org.apache.lucene.index.IndexWriter.prepareCommitInternal(IndexWriter.java:2809)
        at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:2963)
        at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:2930)
        at org.hibernate.search.backend.impl.lucene.IndexWriterHolder.commitIndexWriter(IndexWriterHolder.java:146)
        at org.hibernate.search.backend.impl.lucene.IndexWriterHolder.commitIndexWriter(IndexWriterHolder.java:159)
        at org.hibernate.search.backend.impl.lucene.PerChangeSetCommitPolicy.onChangeSetApplied(PerChangeSetCommitPolicy.java:29)
        at org.hibernate.search.backend.impl.lucene.AbstractWorkspaceImpl.afterTransactionApplied(AbstractWorkspaceImpl.java:97)
        at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.applyUpdates(LuceneBackendQueueTask.java:106)
        at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.run(LuceneBackendQueueTask.java:46)
        at org.hibernate.search.backend.impl.lucene.SyncWorkProcessor$Consumer.applyChangesets(SyncWorkProcessor.java:162)
        at org.hibernate.search.backend.impl.lucene.SyncWorkProcessor$Consumer.run(SyncWorkProcessor.java:148)
        at java.lang.Thread.run(Thread.java:745)

Environment

  • Red Hat JBoss Data Grid (JDG)
    • 6.x
    • 7.0.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content