[JBoss JIRA] (ISPN-4583) Distributed iterator throws ClassCastException when LevelDB cache store contains passivated entries
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-4583?page=com.atlassian.jira.plugin.... ]
Work on ISPN-4583 started by William Burns.
> Distributed iterator throws ClassCastException when LevelDB cache store contains passivated entries
> ---------------------------------------------------------------------------------------------------
>
> 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)
10 years, 5 months
[JBoss JIRA] (ISPN-4565) ReplTotalOrderVersionedStateTransferTest.testStateTransfer random failures
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-4565?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo commented on ISPN-4565:
-----------------------------------
total order does not use the {{StateTransferInterceptor}}. it uses the {{TotalOrderStateTransferInterceptor}}.
> ReplTotalOrderVersionedStateTransferTest.testStateTransfer random failures
> --------------------------------------------------------------------------
>
> Key: ISPN-4565
> URL: https://issues.jboss.org/browse/ISPN-4565
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core, State Transfer, Test Suite - Core
> Affects Versions: 7.0.0.Alpha5
> Reporter: Dan Berindei
> Assignee: Pedro Ruivo
> Priority: Blocker
> Labels: testsuite_stability
> Fix For: 7.0.0.Beta1
>
>
> A NullPointerException appears while processing the 2nd tx:
> {noformat}
> 04:27:12,078 DEBUG (remote-thread-ReplTotalOrderVersionedStateTransferTest-NodeB-p12450-t4:) [TotalOrderInterceptor] Exception while rollback transaction ReplTotalOrderVersionedStateTransferTest-NodeC-12055:56786
> java.lang.NullPointerException
> at org.infinispan.transaction.impl.WriteSkewHelper.performTotalOrderWriteSkewCheckAndReturnNewVersions(WriteSkewHelper.java:76)
> at org.infinispan.interceptors.locking.ClusteringDependentLogic$AbstractClusteringDependentLogic.totalOrderCreateNewVersionsAndCheckForWriteSkews(ClusteringDependentLogic.java:133)
> at org.infinispan.interceptors.locking.ClusteringDependentLogic$AbstractClusteringDependentLogic.createNewVersionsAndCheckForWriteSkews(ClusteringDependentLogic.java:93)
> at org.infinispan.interceptors.totalorder.TotalOrderVersionedEntryWrappingInterceptor.visitPrepareCommand(TotalOrderVersionedEntryWrappingInterceptor.java:62)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:36)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.interceptors.TxInterceptor.invokeNextInterceptorAndVerifyTransaction(TxInterceptor.java:124)
> at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:111)
> at org.infinispan.interceptors.TxInterceptor.visitCommitCommand(TxInterceptor.java:184)
> at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:32)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.interceptors.totalorder.TotalOrderInterceptor.visitSecondPhaseCommand(TotalOrderInterceptor.java:148)
> at org.infinispan.interceptors.totalorder.TotalOrderInterceptor.visitCommitCommand(TotalOrderInterceptor.java:125)
> {noformat}
> (The error message is misleading, this is a commit and not a rollback.)
> The 1st tx still fails with a WriteSkewException, but then the test fails because the 2nd tx didn't update the value:
> {noformat}
> 04:27:12,286 ERROR (testng-ReplTotalOrderVersionedStateTransferTest:) [UnitTestTestNGListener] Test testStateTransfer(org.infinispan.tx.totalorder.statetransfer.ReplTotalOrderVersionedStateTransferTest) failed.
> java.lang.AssertionError: expected:<new world> but was:<world>
> at org.testng.AssertJUnit.fail(AssertJUnit.java:59)
> at org.testng.AssertJUnit.failNotEquals(AssertJUnit.java:364)
> at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:80)
> at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:88)
> at org.infinispan.container.versioning.VersionedReplStateTransferTest.testStateTransfer(VersionedReplStateTransferTest.java:89)
> {noformat}
> Full log here: http://ci.infinispan.org/viewLog.html?buildId=9816&buildTypeId=Infinispan...
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ISPN-4583) Distributed iterator throws ClassCastException when LevelDB cache store contains passivated entries
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-4583?page=com.atlassian.jira.plugin.... ]
William Burns commented on ISPN-4583:
-------------------------------------
There is an issue with the iteration process on a cache loader where it assumes it was a CacheEntry<K, V> instead of V. The tests pass because they don't actually iterate on the contents properly as the values are ignored because they are either found in memory or through activation.
> Distributed iterator throws ClassCastException when LevelDB cache store contains passivated entries
> ---------------------------------------------------------------------------------------------------
>
> 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)
10 years, 5 months
[JBoss JIRA] (ISPN-4565) ReplTotalOrderVersionedStateTransferTest.testStateTransfer random failures
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-4565?page=com.atlassian.jira.plugin.... ]
Dan Berindei commented on ISPN-4565:
------------------------------------
The {{StateTransferInterceptor}} code (before the ISPN-4426 fix) was also triggering a {{PrepareCommand}}, I don't see a check to avoid that for TO. Perhaps the problem now is that we're skipping the {{TotalOrderInterceptor}} for that {{PrepareCommand}}?
> ReplTotalOrderVersionedStateTransferTest.testStateTransfer random failures
> --------------------------------------------------------------------------
>
> Key: ISPN-4565
> URL: https://issues.jboss.org/browse/ISPN-4565
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core, State Transfer, Test Suite - Core
> Affects Versions: 7.0.0.Alpha5
> Reporter: Dan Berindei
> Assignee: Pedro Ruivo
> Priority: Blocker
> Labels: testsuite_stability
> Fix For: 7.0.0.Beta1
>
>
> A NullPointerException appears while processing the 2nd tx:
> {noformat}
> 04:27:12,078 DEBUG (remote-thread-ReplTotalOrderVersionedStateTransferTest-NodeB-p12450-t4:) [TotalOrderInterceptor] Exception while rollback transaction ReplTotalOrderVersionedStateTransferTest-NodeC-12055:56786
> java.lang.NullPointerException
> at org.infinispan.transaction.impl.WriteSkewHelper.performTotalOrderWriteSkewCheckAndReturnNewVersions(WriteSkewHelper.java:76)
> at org.infinispan.interceptors.locking.ClusteringDependentLogic$AbstractClusteringDependentLogic.totalOrderCreateNewVersionsAndCheckForWriteSkews(ClusteringDependentLogic.java:133)
> at org.infinispan.interceptors.locking.ClusteringDependentLogic$AbstractClusteringDependentLogic.createNewVersionsAndCheckForWriteSkews(ClusteringDependentLogic.java:93)
> at org.infinispan.interceptors.totalorder.TotalOrderVersionedEntryWrappingInterceptor.visitPrepareCommand(TotalOrderVersionedEntryWrappingInterceptor.java:62)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:36)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.interceptors.TxInterceptor.invokeNextInterceptorAndVerifyTransaction(TxInterceptor.java:124)
> at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:111)
> at org.infinispan.interceptors.TxInterceptor.visitCommitCommand(TxInterceptor.java:184)
> at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:32)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.interceptors.totalorder.TotalOrderInterceptor.visitSecondPhaseCommand(TotalOrderInterceptor.java:148)
> at org.infinispan.interceptors.totalorder.TotalOrderInterceptor.visitCommitCommand(TotalOrderInterceptor.java:125)
> {noformat}
> (The error message is misleading, this is a commit and not a rollback.)
> The 1st tx still fails with a WriteSkewException, but then the test fails because the 2nd tx didn't update the value:
> {noformat}
> 04:27:12,286 ERROR (testng-ReplTotalOrderVersionedStateTransferTest:) [UnitTestTestNGListener] Test testStateTransfer(org.infinispan.tx.totalorder.statetransfer.ReplTotalOrderVersionedStateTransferTest) failed.
> java.lang.AssertionError: expected:<new world> but was:<world>
> at org.testng.AssertJUnit.fail(AssertJUnit.java:59)
> at org.testng.AssertJUnit.failNotEquals(AssertJUnit.java:364)
> at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:80)
> at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:88)
> at org.infinispan.container.versioning.VersionedReplStateTransferTest.testStateTransfer(VersionedReplStateTransferTest.java:89)
> {noformat}
> Full log here: http://ci.infinispan.org/viewLog.html?buildId=9816&buildTypeId=Infinispan...
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (ISPN-4583) Distributed iterator throws ClassCastException when LevelDB cache store contains passivated entries
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-4583?page=com.atlassian.jira.plugin.... ]
William Burns reassigned ISPN-4583:
-----------------------------------
Assignee: William Burns (was: Dan Berindei)
> Distributed iterator throws ClassCastException when LevelDB cache store contains passivated entries
> ---------------------------------------------------------------------------------------------------
>
> 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)
10 years, 5 months
[JBoss JIRA] (ISPN-4583) Distributed iterator throws ClassCastException when LevelDB cache store contains passivated entries
by Alan Field (JIRA)
[ https://issues.jboss.org/browse/ISPN-4583?page=com.atlassian.jira.plugin.... ]
Alan Field updated ISPN-4583:
-----------------------------
Attachment: repl-udp-no-tx-leveldb-jni.xml
Cache configuration file with LevelDB cache store
> Distributed iterator throws ClassCastException when LevelDB cache store contains passivated entries
> ---------------------------------------------------------------------------------------------------
>
> 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: Dan Berindei
> 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)
10 years, 5 months
[JBoss JIRA] (ISPN-4583) Distributed iterator throws ClassCastException when LevelDB cache store contains passivated entries
by Alan Field (JIRA)
Alan Field created ISPN-4583:
--------------------------------
Summary: Distributed iterator throws ClassCastException when LevelDB cache store contains passivated entries
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: Dan Berindei
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)
10 years, 5 months
[JBoss JIRA] (ISPN-4565) ReplTotalOrderVersionedStateTransferTest.testStateTransfer random failures
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-4565?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo commented on ISPN-4565:
-----------------------------------
The CommitCommand should not trigger a PrepareCommand because the prepare validation is performed with the assumption that the prepare is processed in total order. I think this was cause by ISPN-4426 when the code was moved from the StateTransferInterceptor to the TxInterceptor
> ReplTotalOrderVersionedStateTransferTest.testStateTransfer random failures
> --------------------------------------------------------------------------
>
> Key: ISPN-4565
> URL: https://issues.jboss.org/browse/ISPN-4565
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core, State Transfer, Test Suite - Core
> Affects Versions: 7.0.0.Alpha5
> Reporter: Dan Berindei
> Assignee: Pedro Ruivo
> Priority: Blocker
> Labels: testsuite_stability
> Fix For: 7.0.0.Beta1
>
>
> A NullPointerException appears while processing the 2nd tx:
> {noformat}
> 04:27:12,078 DEBUG (remote-thread-ReplTotalOrderVersionedStateTransferTest-NodeB-p12450-t4:) [TotalOrderInterceptor] Exception while rollback transaction ReplTotalOrderVersionedStateTransferTest-NodeC-12055:56786
> java.lang.NullPointerException
> at org.infinispan.transaction.impl.WriteSkewHelper.performTotalOrderWriteSkewCheckAndReturnNewVersions(WriteSkewHelper.java:76)
> at org.infinispan.interceptors.locking.ClusteringDependentLogic$AbstractClusteringDependentLogic.totalOrderCreateNewVersionsAndCheckForWriteSkews(ClusteringDependentLogic.java:133)
> at org.infinispan.interceptors.locking.ClusteringDependentLogic$AbstractClusteringDependentLogic.createNewVersionsAndCheckForWriteSkews(ClusteringDependentLogic.java:93)
> at org.infinispan.interceptors.totalorder.TotalOrderVersionedEntryWrappingInterceptor.visitPrepareCommand(TotalOrderVersionedEntryWrappingInterceptor.java:62)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:36)
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:124)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.interceptors.TxInterceptor.invokeNextInterceptorAndVerifyTransaction(TxInterceptor.java:124)
> at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:111)
> at org.infinispan.interceptors.TxInterceptor.visitCommitCommand(TxInterceptor.java:184)
> at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:32)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:98)
> at org.infinispan.interceptors.totalorder.TotalOrderInterceptor.visitSecondPhaseCommand(TotalOrderInterceptor.java:148)
> at org.infinispan.interceptors.totalorder.TotalOrderInterceptor.visitCommitCommand(TotalOrderInterceptor.java:125)
> {noformat}
> (The error message is misleading, this is a commit and not a rollback.)
> The 1st tx still fails with a WriteSkewException, but then the test fails because the 2nd tx didn't update the value:
> {noformat}
> 04:27:12,286 ERROR (testng-ReplTotalOrderVersionedStateTransferTest:) [UnitTestTestNGListener] Test testStateTransfer(org.infinispan.tx.totalorder.statetransfer.ReplTotalOrderVersionedStateTransferTest) failed.
> java.lang.AssertionError: expected:<new world> but was:<world>
> at org.testng.AssertJUnit.fail(AssertJUnit.java:59)
> at org.testng.AssertJUnit.failNotEquals(AssertJUnit.java:364)
> at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:80)
> at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:88)
> at org.infinispan.container.versioning.VersionedReplStateTransferTest.testStateTransfer(VersionedReplStateTransferTest.java:89)
> {noformat}
> Full log here: http://ci.infinispan.org/viewLog.html?buildId=9816&buildTypeId=Infinispan...
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months