[JBoss JIRA] (ISPN-4577) Indexing: Read past EOF
by Radim Vansa (JIRA)
[ https://issues.jboss.org/browse/ISPN-4577?page=com.atlassian.jira.plugin.... ]
Radim Vansa closed ISPN-4577.
-----------------------------
Resolution: Rejected
Ouch! Mea culpa, I have not noticed that either. :-/
Is there anything we could do to with such cryptic bugs in configuration? One idea would be to fail early when some cache in the triple is not clustered while the others are, and vice versa.
Another one could be a warning if the cache name is defined in indexing properties but it uses default configuration.
> Indexing: Read past EOF
> -----------------------
>
> Key: ISPN-4577
> URL: https://issues.jboss.org/browse/ISPN-4577
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Embedded Querying
> Affects Versions: 6.0.1.Final
> Reporter: Radim Vansa
> Assignee: Sanne Grinovero
> Priority: Critical
>
> When starting a cluster of 2 nodes with distributed cache configured to index to Infinispan, on the second I get this exception:
> {code}
> org.hibernate.search.SearchException: HSEARCH000103: Unable to initialize IndexManager org.infinispan.query.remote.indexing.ProtobufValueWrapper
> at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:265)
> at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:528)
> at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManagers(IndexManagerHolder.java:495)
> at org.hibernate.search.indexes.impl.IndexManagerHolder.buildEntityIndexBinding(IndexManagerHolder.java:104)
> at org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:359)
> at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:217)
> at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:141)
> at org.infinispan.query.impl.LifecycleManager.getSearchFactory(LifecycleManager.java:213)
> at org.infinispan.query.impl.LifecycleManager.cacheStarting(LifecycleManager.java:73)
> at org.infinispan.factories.ComponentRegistry.notifyCacheStarting(ComponentRegistry.java:228)
> at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:214)
> at org.infinispan.CacheImpl.start(CacheImpl.java:675)
> at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:553)
> at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:516)
> at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:398)
> at (my application stack)
> Caused by: org.hibernate.search.SearchException: Could not initialize index
> at org.hibernate.search.store.impl.DirectoryProviderHelper.initializeIndexIfNeeded(DirectoryProviderHelper.java:162)
> at org.hibernate.search.infinispan.impl.InfinispanDirectoryProvider.start(InfinispanDirectoryProvider.java:103)
> at org.hibernate.search.indexes.impl.DirectoryBasedIndexManager.initialize(DirectoryBasedIndexManager.java:103)
> at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:261)
> ... 23 more
> Caused by: java.io.IOException: Read past EOF
> at org.infinispan.lucene.impl.SingleChunkIndexInput.readByte(SingleChunkIndexInput.java:54)
> at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:41)
> at org.apache.lucene.store.DataInput.readInt(DataInput.java:86)
> at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:272)
> at org.apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java:182)
> at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1168)
> at org.hibernate.search.store.impl.DirectoryProviderHelper.initializeIndexIfNeeded(DirectoryProviderHelper.java:157)
> ... 26 more
> {code}
> Here is the configuration:
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <infinispan
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:infinispan:config:6.0 http://www.infinispan.org/schemas/infinispan-config-6.0.xsd"
> xmlns="urn:infinispan:config:6.0">
> <global>
> <transport clusterName="default" distributedSyncTimeout="600000">
> <properties>
> <property name="configurationFile" value="${infinispan.jgroups.config:jgroups-udp-custom.xml}"/>
> </properties>
> </transport>
> </global>
> <default/>
> <namedCache name="dist_lucene">
> <transaction transactionMode="NON_TRANSACTIONAL"/>
> <clustering mode="DIST">
> <hash numOwners="2" />
> </clustering>
> <locking lockAcquisitionTimeout="3000" concurrencyLevel="1000" />
> <indexing enabled="true" indexLocalOnly="true">
> <properties>
> <property name="default.indexmanager" value="org.infinispan.query.indexmanager.InfinispanIndexManager" />
> <property name="default.exclusive_index_use" value="false" />
> <property name="default.metadata_cachename" value="lucene_metadata_repl" />
> <property name="default.data_cachename" value="lucene_data_dist" />
> <property name="default.locking_cachename" value="lucene_locking_repl" />
> <property name="lucene_version" value="LUCENE_36" />
> </properties>
> </indexing>
> </namedCache>
> <namedCache name="lucene_metadata_repl">
> <clustering mode="REPL">
> <sync replTimeout="30000" />
> </clustering>
> </namedCache>
> <namedCache name="lucene_data_repl">
> <clustering mode="DIST">
> <hash numOwners="2" />
> <sync replTimeout="30000" />
> </clustering>
> </namedCache>
> <namedCache name="lucene_locking_repl">
> <clustering mode="REPL">
> <sync replTimeout="30000" />
> </clustering>
> </namedCache>
> </infinispan>
> {code}
> I was not able to locate the root cause though I can replicate the issue all the time.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
8 years, 8 months
[JBoss JIRA] (ISPN-4584) Stricter validation of cache configurations for distributed indexes
by Sanne Grinovero (JIRA)
Sanne Grinovero created ISPN-4584:
-------------------------------------
Summary: Stricter validation of cache configurations for distributed indexes
Key: ISPN-4584
URL: https://issues.jboss.org/browse/ISPN-4584
Project: Infinispan
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Reporter: Sanne Grinovero
Assignee: Mircea Markus
See also ISPN-4577 : it should not be allowed to configure a distributed metadata cache while the chunks cache is using local mode.
Ideally think of additional strict checks which we should apply.. suggestions?
Mitigated by ISPN-4340
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
8 years, 8 months
[JBoss JIRA] (ISPN-4577) Indexing: Read past EOF
by Sanne Grinovero (JIRA)
[ https://issues.jboss.org/browse/ISPN-4577?page=com.atlassian.jira.plugin.... ]
Sanne Grinovero commented on ISPN-4577:
---------------------------------------
[~rvansa] I think it's a typo in the configuration, although it took me more than an hour to figure it out :-)
{code}<property name="default.data_cachename" value="lucene_data_dist" />{code}
{code}<namedCache name="lucene_data_repl">{code}
The cache names don't match, so the metadata is correctly shared across the nodes, but the actual content of the chunks is not. Hence the EOF exception as the files are shorted than expected..
> Indexing: Read past EOF
> -----------------------
>
> Key: ISPN-4577
> URL: https://issues.jboss.org/browse/ISPN-4577
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Embedded Querying
> Affects Versions: 6.0.1.Final
> Reporter: Radim Vansa
> Assignee: Sanne Grinovero
> Priority: Critical
>
> When starting a cluster of 2 nodes with distributed cache configured to index to Infinispan, on the second I get this exception:
> {code}
> org.hibernate.search.SearchException: HSEARCH000103: Unable to initialize IndexManager org.infinispan.query.remote.indexing.ProtobufValueWrapper
> at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:265)
> at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:528)
> at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManagers(IndexManagerHolder.java:495)
> at org.hibernate.search.indexes.impl.IndexManagerHolder.buildEntityIndexBinding(IndexManagerHolder.java:104)
> at org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:359)
> at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:217)
> at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:141)
> at org.infinispan.query.impl.LifecycleManager.getSearchFactory(LifecycleManager.java:213)
> at org.infinispan.query.impl.LifecycleManager.cacheStarting(LifecycleManager.java:73)
> at org.infinispan.factories.ComponentRegistry.notifyCacheStarting(ComponentRegistry.java:228)
> at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:214)
> at org.infinispan.CacheImpl.start(CacheImpl.java:675)
> at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:553)
> at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:516)
> at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:398)
> at (my application stack)
> Caused by: org.hibernate.search.SearchException: Could not initialize index
> at org.hibernate.search.store.impl.DirectoryProviderHelper.initializeIndexIfNeeded(DirectoryProviderHelper.java:162)
> at org.hibernate.search.infinispan.impl.InfinispanDirectoryProvider.start(InfinispanDirectoryProvider.java:103)
> at org.hibernate.search.indexes.impl.DirectoryBasedIndexManager.initialize(DirectoryBasedIndexManager.java:103)
> at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:261)
> ... 23 more
> Caused by: java.io.IOException: Read past EOF
> at org.infinispan.lucene.impl.SingleChunkIndexInput.readByte(SingleChunkIndexInput.java:54)
> at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:41)
> at org.apache.lucene.store.DataInput.readInt(DataInput.java:86)
> at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:272)
> at org.apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java:182)
> at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1168)
> at org.hibernate.search.store.impl.DirectoryProviderHelper.initializeIndexIfNeeded(DirectoryProviderHelper.java:157)
> ... 26 more
> {code}
> Here is the configuration:
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <infinispan
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:infinispan:config:6.0 http://www.infinispan.org/schemas/infinispan-config-6.0.xsd"
> xmlns="urn:infinispan:config:6.0">
> <global>
> <transport clusterName="default" distributedSyncTimeout="600000">
> <properties>
> <property name="configurationFile" value="${infinispan.jgroups.config:jgroups-udp-custom.xml}"/>
> </properties>
> </transport>
> </global>
> <default/>
> <namedCache name="dist_lucene">
> <transaction transactionMode="NON_TRANSACTIONAL"/>
> <clustering mode="DIST">
> <hash numOwners="2" />
> </clustering>
> <locking lockAcquisitionTimeout="3000" concurrencyLevel="1000" />
> <indexing enabled="true" indexLocalOnly="true">
> <properties>
> <property name="default.indexmanager" value="org.infinispan.query.indexmanager.InfinispanIndexManager" />
> <property name="default.exclusive_index_use" value="false" />
> <property name="default.metadata_cachename" value="lucene_metadata_repl" />
> <property name="default.data_cachename" value="lucene_data_dist" />
> <property name="default.locking_cachename" value="lucene_locking_repl" />
> <property name="lucene_version" value="LUCENE_36" />
> </properties>
> </indexing>
> </namedCache>
> <namedCache name="lucene_metadata_repl">
> <clustering mode="REPL">
> <sync replTimeout="30000" />
> </clustering>
> </namedCache>
> <namedCache name="lucene_data_repl">
> <clustering mode="DIST">
> <hash numOwners="2" />
> <sync replTimeout="30000" />
> </clustering>
> </namedCache>
> <namedCache name="lucene_locking_repl">
> <clustering mode="REPL">
> <sync replTimeout="30000" />
> </clustering>
> </namedCache>
> </infinispan>
> {code}
> I was not able to locate the root cause though I can replicate the issue all the time.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
8 years, 8 months
[JBoss JIRA] (ISPN-4376) AdvancedCache.filterEntries(...) does not respect configured cache flags
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-4376?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-4376:
--------------------------------
Fix Version/s: 7.0.0.Beta1
> AdvancedCache.filterEntries(...) does not respect configured cache flags
> ------------------------------------------------------------------------
>
> Key: ISPN-4376
> URL: https://issues.jboss.org/browse/ISPN-4376
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: 7.0.0.Alpha4
> Reporter: Paul Ferraro
> Assignee: William Burns
> Fix For: 7.0.0.Beta1
>
>
> Consider the following:
> {code}
> Cache<K, V> cache = ...;
> KeyValueFilter<K, V> filter = ...;
> EntryIterator<K, V> entries = cache.getAdvancedCache().withFlags(Flag.CACHE_MODE_LOCAL, Flag.SKIP_CACHE_LOAD).filterEntries(filter);
> {code}
> One would expect this to return only local, in-memory entries, but it instead returns both entries from remote nodes and from a cache loader, effectively ignoring the configured flags.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
8 years, 8 months
[JBoss JIRA] (ISPN-4583) Distributed iterator throws ClassCastException when loader contains values that pass filter
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-4583?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-4583:
--------------------------------
Fix Version/s: 7.0.0.Beta1
> Distributed iterator throws ClassCastException when loader contains values that pass filter
> -------------------------------------------------------------------------------------------
>
> Key: ISPN-4583
> URL: https://issues.jboss.org/browse/ISPN-4583
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: 7.0.0.Alpha5
> Reporter: Alan Field
> Assignee: William Burns
> Fix For: 7.0.0.Beta1
>
> Attachments: repl-udp-no-tx-leveldb-jni.xml
>
>
> This code will iterate over all of the entries in a cache to get the total size:
> {code:java}
> public int getTotalSize() {
> log.info(getClass().getName() + ".getTotalSize() for cache " + cache.getName());
> int totalSize = 0;
> EntryIterable entryIterator = null;
> try {
> entryIterator = cache.filterEntries(new AllEntriesFilter());
> CloseableIterable ci = entryIterator.converter(new AllEntriesConverter());
> Iterator iter = ci.iterator();
> while (iter.hasNext()) {
> iter.next();
> totalSize++;
> }
> return totalSize;
> } finally {
> if (entryIterator != null) {
> try {
> entryIterator.close();
> } catch (Exception e) {
> log.error("Failed to close EntryIterable", e);
> }
> }
> }
> }
> {code}
> I wanted to verify that this code would also work when I was using passivation and a cachestore. The repl-udp-no-tx-leveldb-jni.xml file defines the configuration that I am using. I run a test that puts random data into the cache then checks the size of the cache, but I am getting a bunch of ClassCastException exceptions during the iteration:
> {noformat}
> java.lang.ClassCastException: java.lang.String cannot be cast to org.infinispan.container.entries.InternalCacheEntry
> at org.infinispan.iteration.impl.LocalEntryRetriever$MapAction.apply(LocalEntryRetriever.java:251)
> at org.infinispan.iteration.impl.LocalEntryRetriever$KeyValueActionForCacheLoaderTask.processEntry(LocalEntryRetriever.java:154)
> at org.infinispan.persistence.leveldb.LevelDBStore$1.call(LevelDBStore.java:297)
> at org.infinispan.persistence.leveldb.LevelDBStore$1.call(LevelDBStore.java:285)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:22)
> at java.util.concurrent.ExecutorCompletionService.submit(ExecutorCompletionService.java:181)
> at org.infinispan.executors.ExecutorAllCompletionService.submit(ExecutorAllCompletionService.java:31)
> at org.infinispan.persistence.leveldb.LevelDBStore.submitProcessTask(LevelDBStore.java:285)
> at org.infinispan.persistence.leveldb.LevelDBStore.process(LevelDBStore.java:260)
> at org.infinispan.persistence.manager.PersistenceManagerImpl.processOnAllStores(PersistenceManagerImpl.java:438)
> at org.infinispan.persistence.manager.PersistenceManagerImpl.processOnAllStores(PersistenceManagerImpl.java:420)
> at org.infinispan.iteration.impl.LocalEntryRetriever$1.run(LocalEntryRetriever.java:217)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
8 years, 8 months
[JBoss JIRA] (ISPN-4583) Distributed iterator throws ClassCastException when loader contains values that pass filter
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-4583?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-4583:
--------------------------------
Status: Pull Request Sent (was: Coding In Progress)
Git Pull Request: https://github.com/infinispan/infinispan/pull/2757
> Distributed iterator throws ClassCastException when loader contains values that pass filter
> -------------------------------------------------------------------------------------------
>
> Key: ISPN-4583
> URL: https://issues.jboss.org/browse/ISPN-4583
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: 7.0.0.Alpha5
> Reporter: Alan Field
> Assignee: William Burns
> Attachments: repl-udp-no-tx-leveldb-jni.xml
>
>
> This code will iterate over all of the entries in a cache to get the total size:
> {code:java}
> public int getTotalSize() {
> log.info(getClass().getName() + ".getTotalSize() for cache " + cache.getName());
> int totalSize = 0;
> EntryIterable entryIterator = null;
> try {
> entryIterator = cache.filterEntries(new AllEntriesFilter());
> CloseableIterable ci = entryIterator.converter(new AllEntriesConverter());
> Iterator iter = ci.iterator();
> while (iter.hasNext()) {
> iter.next();
> totalSize++;
> }
> return totalSize;
> } finally {
> if (entryIterator != null) {
> try {
> entryIterator.close();
> } catch (Exception e) {
> log.error("Failed to close EntryIterable", e);
> }
> }
> }
> }
> {code}
> I wanted to verify that this code would also work when I was using passivation and a cachestore. The repl-udp-no-tx-leveldb-jni.xml file defines the configuration that I am using. I run a test that puts random data into the cache then checks the size of the cache, but I am getting a bunch of ClassCastException exceptions during the iteration:
> {noformat}
> java.lang.ClassCastException: java.lang.String cannot be cast to org.infinispan.container.entries.InternalCacheEntry
> at org.infinispan.iteration.impl.LocalEntryRetriever$MapAction.apply(LocalEntryRetriever.java:251)
> at org.infinispan.iteration.impl.LocalEntryRetriever$KeyValueActionForCacheLoaderTask.processEntry(LocalEntryRetriever.java:154)
> at org.infinispan.persistence.leveldb.LevelDBStore$1.call(LevelDBStore.java:297)
> at org.infinispan.persistence.leveldb.LevelDBStore$1.call(LevelDBStore.java:285)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:22)
> at java.util.concurrent.ExecutorCompletionService.submit(ExecutorCompletionService.java:181)
> at org.infinispan.executors.ExecutorAllCompletionService.submit(ExecutorAllCompletionService.java:31)
> at org.infinispan.persistence.leveldb.LevelDBStore.submitProcessTask(LevelDBStore.java:285)
> at org.infinispan.persistence.leveldb.LevelDBStore.process(LevelDBStore.java:260)
> at org.infinispan.persistence.manager.PersistenceManagerImpl.processOnAllStores(PersistenceManagerImpl.java:438)
> at org.infinispan.persistence.manager.PersistenceManagerImpl.processOnAllStores(PersistenceManagerImpl.java:420)
> at org.infinispan.iteration.impl.LocalEntryRetriever$1.run(LocalEntryRetriever.java:217)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
8 years, 8 months