[JBoss JIRA] (ISPN-2746) testDistributedPutWithTopologyChanges test randomly fails on all environments for org.infinispan.server.hotrod.HotRodDistributionTest and org.infinispan.server.hotrod.HotRod11DistributionTest
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-2746?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-2746:
-----------------------------------------------
Vitalii Chepeliuk <vchepeli(a)redhat.com> changed the Status of [bug 903247|https://bugzilla.redhat.com/show_bug.cgi?id=903247] from ON_QA to VERIFIED
> testDistributedPutWithTopologyChanges test randomly fails on all environments for org.infinispan.server.hotrod.HotRodDistributionTest and org.infinispan.server.hotrod.HotRod11DistributionTest
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-2746
> URL: https://issues.jboss.org/browse/ISPN-2746
> Project: Infinispan
> Issue Type: Bug
> Components: Server
> Affects Versions: 5.2.0.CR2
> Reporter: Anna Manukyan
> Assignee: Dan Berindei
> Labels: testsuite_stability
> Fix For: 5.2.2.Final, 5.3.0.Alpha1
>
>
> The test org.infinispan.server.hotrod.HotRodDistributionTest.testDistributedPutWithTopologyChanges almost always fails on all environments (Solaris, Windows, RHEL). The same issue happens for test org.infinispan.server.hotrod.HotRod11DistributionTest.testDistributedPutWithTopologyChanges with the same error message.
> The error is:
> {code}
> Error Message
> expected [7] but found [6]
> Stacktrace
> java.lang.AssertionError: expected [7] but found [6]
> at org.testng.Assert.fail(Assert.java:89)
> at org.testng.Assert.failNotEquals(Assert.java:489)
> at org.testng.Assert.assertEquals(Assert.java:118)
> at org.testng.Assert.assertEquals(Assert.java:365)
> at org.testng.Assert.assertEquals(Assert.java:375)
> at org.infinispan.server.hotrod.test.HotRodTestingUtil$.assertTopologyId(HotRodTestingUtil.scala:306)
> at org.infinispan.server.hotrod.test.HotRodTestingUtil$.assertHashTopology10Received(HotRodTestingUtil.scala:230)
> at org.infinispan.server.hotrod.test.HotRodTestingUtil$.assertHashTopology10Received(HotRodTestingUtil.scala:217)
> at org.infinispan.server.hotrod.HotRodDistributionTest.testDistributedPutWithTopologyChanges(HotRodDistributionTest.scala:119)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:715)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:907)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1237)
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
> at org.testng.TestRunner.privateRun(TestRunner.java:767)
> at org.testng.TestRunner.run(TestRunner.java:617)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
> at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
> at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
> at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (ISPN-2618) org.infinispan.distribution.rehash.L1OnRehashDisabledTest.testInvalidationBehaviorOnRehash randomly fails
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-2618?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-2618:
-----------------------------------------------
Vitalii Chepeliuk <vchepeli(a)redhat.com> changed the Status of [bug 885995|https://bugzilla.redhat.com/show_bug.cgi?id=885995] from ON_QA to VERIFIED
> org.infinispan.distribution.rehash.L1OnRehashDisabledTest.testInvalidationBehaviorOnRehash randomly fails
> ----------------------------------------------------------------------------------------------------------
>
> Key: ISPN-2618
> URL: https://issues.jboss.org/browse/ISPN-2618
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 5.2.0.Beta5
> Reporter: Anna Manukyan
> Assignee: Dan Berindei
> Labels: testsuite_stability
> Fix For: 6.0.0.Alpha1
>
>
> The test is randomly failing on different environments.
> The error is:
> {code}
> Error Message
> Fail on non-owner cache L1OnRehashDisabledTest-NodeA-8972: dc.get(MagicKey#k2{18b213c7@L1OnRehashDisabledTest-NodeC-18200}) returned MortalCacheEntry{key=MagicKey#k2{18b213c7@L1OnRehashDisabledTest-NodeC-18200}, value=MortalCacheValue{value=v2, lifespan=600000, created=1355149157148}}!
> Stacktrace
> java.lang.AssertionError: Fail on non-owner cache L1OnRehashDisabledTest-NodeA-8972: dc.get(MagicKey#k2{18b213c7@L1OnRehashDisabledTest-NodeC-18200}) returned MortalCacheEntry{key=MagicKey#k2{18b213c7@L1OnRehashDisabledTest-NodeC-18200}, value=MortalCacheValue{value=v2, lifespan=600000, created=1355149157148}}!
> at org.infinispan.distribution.BaseDistFunctionalTest.assertOwnershipAndNonOwnership(BaseDistFunctionalTest.java:212)
> at org.infinispan.distribution.rehash.L1OnRehashTest.testInvalidationBehaviorOnRehash(L1OnRehashTest.java:117)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:715)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:907)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1237)
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
> at org.testng.TestRunner.privateRun(TestRunner.java:767)
> at org.testng.TestRunner.run(TestRunner.java:617)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
> at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
> at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
> at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (ISPN-2863) TopologyAwareTwoNodesMapReduceTest.testInvokeMapWithReduceExceptionPhaseInRemoteExecution
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-2863?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-2863:
-----------------------------------------------
Vitalii Chepeliuk <vchepeli(a)redhat.com> changed the Status of [bug 915831|https://bugzilla.redhat.com/show_bug.cgi?id=915831] from ON_QA to VERIFIED
> TopologyAwareTwoNodesMapReduceTest.testInvokeMapWithReduceExceptionPhaseInRemoteExecution
> -----------------------------------------------------------------------------------------
>
> Key: ISPN-2863
> URL: https://issues.jboss.org/browse/ISPN-2863
> Project: Infinispan
> Issue Type: Bug
> Components: Distributed Execution and Map/Reduce
> Affects Versions: 5.2.2.Final
> Environment: OracleJDK1.7, Solaris10Sparc x64
> Reporter: Vitalii Chepeliuk
> Assignee: Vladimir Blagojevic
> Labels: testsuite_stability
> Fix For: 6.0.0.Alpha2
>
>
> Error Message
> Method SimpleTwoNodesMapReduceTest.testInvokeMapWithReduceExceptionPhaseInRemoteExecution()[pri:0, instance:org.infinispan.distexec.mapreduce.TopologyAwareTwoNodesMapReduceTest@794d1a90] should have thrown an exception of class org.infinispan.CacheException
> Stacktrace
> org.testng.TestException:
> Method SimpleTwoNodesMapReduceTest.testInvokeMapWithReduceExceptionPhaseInRemoteExecution()[pri:0, instance:org.infinispan.distexec.mapreduce.TopologyAwareTwoNodesMapReduceTest@794d1a90] should have thrown an exception of class org.infinispan.CacheException
> at org.testng.internal.Invoker.handleInvocationResults(Invoker.java:1518)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:764)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:907)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1237)
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
> at org.testng.TestRunner.privateRun(TestRunner.java:767)
> at org.testng.TestRunner.run(TestRunner.java:617)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
> at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
> at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
> at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> Standard Output
> [testng-TopologyAwareTwoNodesMapReduceTest] Test testInvokeMapWithReduceExceptionPhaseInRemoteExecution(org.infinispan.distexec.mapreduce.TopologyAwareTwoNodesMapReduceTest) failed.
> 2013-02-25 15:13:34,026 ERROR [UnitTestTestNGListener] (testng-TopologyAwareTwoNodesMapReduceTest) Test testInvokeMapWithReduceExceptionPhaseInRemoteExecution(org.infinispan.distexec.mapreduce.TopologyAwareTwoNodesMapReduceTest) failed.
> org.testng.TestException:
> Method SimpleTwoNodesMapReduceTest.testInvokeMapWithReduceExceptionPhaseInRemoteExecution()[pri:0, instance:org.infinispan.distexec.mapreduce.TopologyAwareTwoNodesMapReduceTest@794d1a90] should have thrown an exception of class org.infinispan.CacheException
> at org.testng.internal.Invoker.handleInvocationResults(Invoker.java:1518)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:764)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:907)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1237)
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
> at org.testng.TestRunner.privateRun(TestRunner.java:767)
> at org.testng.TestRunner.run(TestRunner.java:617)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
> at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
> at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
> at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> Test suite progress: tests succeeded: 1680, failed: 1, skipped: 0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (ISPN-3405) Entries are passivated with wrong ID in DB
by Martin Gencur (JIRA)
[ https://issues.jboss.org/browse/ISPN-3405?page=com.atlassian.jira.plugin.... ]
Martin Gencur commented on ISPN-3405:
-------------------------------------
To summarize this, the getLockFromKey() method uses internally just hashCode invoked on the object passed as a parameter. While this was OK in ISPN 5.2 (ByteArrayKey was passed when the key was byte[]), now it's a problem because byte array is passed directly and so the hashCode method generates wrong hash. This IMO results in many entries stored in the same bucket which is, at minimum, a serious performance issue.
> Entries are passivated with wrong ID in DB
> ------------------------------------------
>
> Key: ISPN-3405
> URL: https://issues.jboss.org/browse/ISPN-3405
> Project: Infinispan
> Issue Type: Bug
> Components: Eviction
> Affects Versions: 6.0.0.Alpha1
> Reporter: Vitalii Chepeliuk
> Assignee: Galder Zamarreño
> Fix For: 6.0.0.Final
>
>
> Entry passivation into DB, concretly this class LockSupportCacheStore and method store. Look at lines with "<<<" string for more info
> {code:title=Bar.java|borderStyle=solid}
> @Override
> public final void store(InternalCacheEntry ed) throws CacheLoaderException {
> if (trace) {
> log.tracef("store(%s)", ed);
> }
> if (ed == null) {
> return;
> }
> if (ed.canExpire() && ed.isExpired(timeService.wallClockTime())) {
> if (containsKey(ed.getKey())) {
> if (trace) {
> log.tracef("Entry %s is expired! Removing!", ed);
> }
> remove(ed.getKey());
> } else {
> if (trace) {
> log.tracef("Entry %s is expired! Not doing anything.", ed);
> }
> }
> return;
> }
> L keyHashCode = getLockFromKey(ed.getKey()); <<< here key is generated like ed.getKey().hashCode() & 0xfffffc00;
> lockForWriting(keyHashCode);
> try {
> storeLockSafe(ed, keyHashCode); <<< here it should be stored into Bucket and then stored in DB
> } finally {
> unlock(keyHashCode);
> }
> if (trace) {
> log.tracef("exit store(%s)", ed);
> }
> }
> {code}
> When I use RemoteCacheManager and RemoteCache I am putting entries into cache
> {code:title=Bar.java|borderStyle=solid}
> cache.put("key1", "v1");
> cache.put("key2", "v2");
> cache.put("key3", "v3");
> {code}
> Then 2 entries are passivated and stored in DB
> ||ID||DATA||TIMESTAMP||
> |183713792|0301fe032a01034c422b21033e286d7942657374506572736f6e616c4b657957686963684861734e657665724265656e426574746572420521033e02763203620003630000000000000002|-1|
> |23486464|0301fe032a01034c420721033e046b657931420521033e02763103620003630000000000000001|-1|
> IDs are generated from method above and
> {code:title=Bar.java|borderStyle=solid}
> byte[] keyBytes = marshaller.objectToByteBuffer("key1"); <<< key is marshalled
> long keyID = ByteArrayEquivalence.INSTANCE.hashCode(keyBytes) & 0xfffffc00 //computation taken from BucketBasedCacheStore <<< this does not work for me
> ode}
> And next step I'd like to retrieve data from DB
> SELECT ID, DATA FROM JDBC_BINARY_DEFAULT WHERE ID=keyID
> But in method
> {code:title=Bar.java|borderStyle=solid}
> @Override
> public Integer getLockFromKey(Object key) {
> return key.hashCode() & 0xfffffc00; <<< here should be used Arrays.hashCode((byte[])key) & 0xfffffc00), if key is represented as byte array, or used ByteArrayEquivalence instead of simple byte array(byte[]) as argument
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (ISPN-3405) Entries are passivated with wrong ID in DB
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-3405?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration updated ISPN-3405:
------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=996877
> Entries are passivated with wrong ID in DB
> ------------------------------------------
>
> Key: ISPN-3405
> URL: https://issues.jboss.org/browse/ISPN-3405
> Project: Infinispan
> Issue Type: Bug
> Components: Eviction
> Affects Versions: 6.0.0.Alpha1
> Reporter: Vitalii Chepeliuk
> Assignee: Galder Zamarreño
> Fix For: 6.0.0.Final
>
>
> Entry passivation into DB, concretly this class LockSupportCacheStore and method store. Look at lines with "<<<" string for more info
> {code:title=Bar.java|borderStyle=solid}
> @Override
> public final void store(InternalCacheEntry ed) throws CacheLoaderException {
> if (trace) {
> log.tracef("store(%s)", ed);
> }
> if (ed == null) {
> return;
> }
> if (ed.canExpire() && ed.isExpired(timeService.wallClockTime())) {
> if (containsKey(ed.getKey())) {
> if (trace) {
> log.tracef("Entry %s is expired! Removing!", ed);
> }
> remove(ed.getKey());
> } else {
> if (trace) {
> log.tracef("Entry %s is expired! Not doing anything.", ed);
> }
> }
> return;
> }
> L keyHashCode = getLockFromKey(ed.getKey()); <<< here key is generated like ed.getKey().hashCode() & 0xfffffc00;
> lockForWriting(keyHashCode);
> try {
> storeLockSafe(ed, keyHashCode); <<< here it should be stored into Bucket and then stored in DB
> } finally {
> unlock(keyHashCode);
> }
> if (trace) {
> log.tracef("exit store(%s)", ed);
> }
> }
> {code}
> When I use RemoteCacheManager and RemoteCache I am putting entries into cache
> {code:title=Bar.java|borderStyle=solid}
> cache.put("key1", "v1");
> cache.put("key2", "v2");
> cache.put("key3", "v3");
> {code}
> Then 2 entries are passivated and stored in DB
> ||ID||DATA||TIMESTAMP||
> |183713792|0301fe032a01034c422b21033e286d7942657374506572736f6e616c4b657957686963684861734e657665724265656e426574746572420521033e02763203620003630000000000000002|-1|
> |23486464|0301fe032a01034c420721033e046b657931420521033e02763103620003630000000000000001|-1|
> IDs are generated from method above and
> {code:title=Bar.java|borderStyle=solid}
> byte[] keyBytes = marshaller.objectToByteBuffer("key1"); <<< key is marshalled
> long keyID = ByteArrayEquivalence.INSTANCE.hashCode(keyBytes) & 0xfffffc00 //computation taken from BucketBasedCacheStore <<< this does not work for me
> ode}
> And next step I'd like to retrieve data from DB
> SELECT ID, DATA FROM JDBC_BINARY_DEFAULT WHERE ID=keyID
> But in method
> {code:title=Bar.java|borderStyle=solid}
> @Override
> public Integer getLockFromKey(Object key) {
> return key.hashCode() & 0xfffffc00; <<< here should be used Arrays.hashCode((byte[])key) & 0xfffffc00), if key is represented as byte array, or used ByteArrayEquivalence instead of simple byte array(byte[]) as argument
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (ISPN-3405) Entries are passivated with wrong ID in DB
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-3405?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-3405:
-----------------------------------------------
Vitalii Chepeliuk <vchepeli(a)redhat.com> made a comment on [bug 996877|https://bugzilla.redhat.com/show_bug.cgi?id=996877]
See description here: https://issues.jboss.org/browse/ISPN-3405
> Entries are passivated with wrong ID in DB
> ------------------------------------------
>
> Key: ISPN-3405
> URL: https://issues.jboss.org/browse/ISPN-3405
> Project: Infinispan
> Issue Type: Bug
> Components: Eviction
> Affects Versions: 6.0.0.Alpha1
> Reporter: Vitalii Chepeliuk
> Assignee: Galder Zamarreño
> Fix For: 6.0.0.Final
>
>
> Entry passivation into DB, concretly this class LockSupportCacheStore and method store. Look at lines with "<<<" string for more info
> {code:title=Bar.java|borderStyle=solid}
> @Override
> public final void store(InternalCacheEntry ed) throws CacheLoaderException {
> if (trace) {
> log.tracef("store(%s)", ed);
> }
> if (ed == null) {
> return;
> }
> if (ed.canExpire() && ed.isExpired(timeService.wallClockTime())) {
> if (containsKey(ed.getKey())) {
> if (trace) {
> log.tracef("Entry %s is expired! Removing!", ed);
> }
> remove(ed.getKey());
> } else {
> if (trace) {
> log.tracef("Entry %s is expired! Not doing anything.", ed);
> }
> }
> return;
> }
> L keyHashCode = getLockFromKey(ed.getKey()); <<< here key is generated like ed.getKey().hashCode() & 0xfffffc00;
> lockForWriting(keyHashCode);
> try {
> storeLockSafe(ed, keyHashCode); <<< here it should be stored into Bucket and then stored in DB
> } finally {
> unlock(keyHashCode);
> }
> if (trace) {
> log.tracef("exit store(%s)", ed);
> }
> }
> {code}
> When I use RemoteCacheManager and RemoteCache I am putting entries into cache
> {code:title=Bar.java|borderStyle=solid}
> cache.put("key1", "v1");
> cache.put("key2", "v2");
> cache.put("key3", "v3");
> {code}
> Then 2 entries are passivated and stored in DB
> ||ID||DATA||TIMESTAMP||
> |183713792|0301fe032a01034c422b21033e286d7942657374506572736f6e616c4b657957686963684861734e657665724265656e426574746572420521033e02763203620003630000000000000002|-1|
> |23486464|0301fe032a01034c420721033e046b657931420521033e02763103620003630000000000000001|-1|
> IDs are generated from method above and
> {code:title=Bar.java|borderStyle=solid}
> byte[] keyBytes = marshaller.objectToByteBuffer("key1"); <<< key is marshalled
> long keyID = ByteArrayEquivalence.INSTANCE.hashCode(keyBytes) & 0xfffffc00 //computation taken from BucketBasedCacheStore <<< this does not work for me
> ode}
> And next step I'd like to retrieve data from DB
> SELECT ID, DATA FROM JDBC_BINARY_DEFAULT WHERE ID=keyID
> But in method
> {code:title=Bar.java|borderStyle=solid}
> @Override
> public Integer getLockFromKey(Object key) {
> return key.hashCode() & 0xfffffc00; <<< here should be used Arrays.hashCode((byte[])key) & 0xfffffc00), if key is represented as byte array, or used ByteArrayEquivalence instead of simple byte array(byte[]) as argument
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (ISPN-3407) Entry passivation doesn't work according to eviction strategy
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-3407?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration updated ISPN-3407:
------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=996876
> Entry passivation doesn't work according to eviction strategy
> -------------------------------------------------------------
>
> Key: ISPN-3407
> URL: https://issues.jboss.org/browse/ISPN-3407
> Project: Infinispan
> Issue Type: Bug
> Components: Eviction
> Affects Versions: 6.0.0.Alpha2
> Reporter: Vitalii Chepeliuk
> Assignee: Mircea Markus
>
> {code:title=Bar.java|borderStyle=solid}
> GlobalConfiguration globalConf = new GlobalConfigurationBuilder().nonClusteredDefault().build();
> ConfigurationBuilder builder = new ConfigurationBuilder();
> builder.clustering().cacheMode(CacheMode.LOCAL)
> .loaders().passivation(true).preload(false).shared(false)
> .addLoader(JdbcStringBasedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
> .table()
> .databaseType(DatabaseType.MYSQL)
> .dropOnExit(false)
> .createOnStart(true)
> .tableNamePrefix("ISPN6Alpha2_STRING")
> .idColumnName("ID").idColumnType("VARCHAR(255)")
> .dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
> .timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
> .connectionPool()
> .connectionUrl()
> .username("username")
> .password("password")
> .driverClass("com.mysql.jdbc.Driver")
> .eviction().strategy(EvictionStrategy.LRU).maxEntries(2);
> Configuration localConf = builder.build();
> DefaultCacheManager defCacheManager = new DefaultCacheManager(globalConf, localConf, true);
> Cache<String, String> cache = defCacheManager.getCache();
> cache.put("k1", "v1");
> cache.put("k2", "v2");
> //not yet in store (eviction.max-entries=2, LRU)
> cache.put("k3", "v3");
> assertEquals("v3", cache.get("k3"));
> //now k1 evicted and stored in store
> assertEquals(2, cache.size()); <<< only 2 entries should remain in cache, k1 should be passivated and removed. But doesn't work!
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (ISPN-3407) Entry passivation doesn't work according to eviction strategy
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-3407?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-3407:
-----------------------------------------------
Vitalii Chepeliuk <vchepeli(a)redhat.com> made a comment on [bug 996876|https://bugzilla.redhat.com/show_bug.cgi?id=996876]
See description here: https://issues.jboss.org/browse/ISPN-3407
> Entry passivation doesn't work according to eviction strategy
> -------------------------------------------------------------
>
> Key: ISPN-3407
> URL: https://issues.jboss.org/browse/ISPN-3407
> Project: Infinispan
> Issue Type: Bug
> Components: Eviction
> Affects Versions: 6.0.0.Alpha2
> Reporter: Vitalii Chepeliuk
> Assignee: Mircea Markus
>
> {code:title=Bar.java|borderStyle=solid}
> GlobalConfiguration globalConf = new GlobalConfigurationBuilder().nonClusteredDefault().build();
> ConfigurationBuilder builder = new ConfigurationBuilder();
> builder.clustering().cacheMode(CacheMode.LOCAL)
> .loaders().passivation(true).preload(false).shared(false)
> .addLoader(JdbcStringBasedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
> .table()
> .databaseType(DatabaseType.MYSQL)
> .dropOnExit(false)
> .createOnStart(true)
> .tableNamePrefix("ISPN6Alpha2_STRING")
> .idColumnName("ID").idColumnType("VARCHAR(255)")
> .dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
> .timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
> .connectionPool()
> .connectionUrl()
> .username("username")
> .password("password")
> .driverClass("com.mysql.jdbc.Driver")
> .eviction().strategy(EvictionStrategy.LRU).maxEntries(2);
> Configuration localConf = builder.build();
> DefaultCacheManager defCacheManager = new DefaultCacheManager(globalConf, localConf, true);
> Cache<String, String> cache = defCacheManager.getCache();
> cache.put("k1", "v1");
> cache.put("k2", "v2");
> //not yet in store (eviction.max-entries=2, LRU)
> cache.put("k3", "v3");
> assertEquals("v3", cache.get("k3"));
> //now k1 evicted and stored in store
> assertEquals(2, cache.size()); <<< only 2 entries should remain in cache, k1 should be passivated and removed. But doesn't work!
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (ISPN-3407) Entry passivation doesn't work according to eviction strategy
by Vitalii Chepeliuk (JIRA)
[ https://issues.jboss.org/browse/ISPN-3407?page=com.atlassian.jira.plugin.... ]
Vitalii Chepeliuk updated ISPN-3407:
------------------------------------
Description:
{code:title=Bar.java|borderStyle=solid}
GlobalConfiguration globalConf = new GlobalConfigurationBuilder().nonClusteredDefault().build();
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.clustering().cacheMode(CacheMode.LOCAL)
.loaders().passivation(true).preload(false).shared(false)
.addLoader(JdbcStringBasedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
.table()
.databaseType(DatabaseType.MYSQL)
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix("ISPN6Alpha2_STRING")
.idColumnName("ID").idColumnType("VARCHAR(255)")
.dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
.timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
.connectionPool()
.connectionUrl()
.username("username")
.password("password")
.driverClass("com.mysql.jdbc.Driver")
.eviction().strategy(EvictionStrategy.LRU).maxEntries(2);
Configuration localConf = builder.build();
DefaultCacheManager defCacheManager = new DefaultCacheManager(globalConf, localConf, true);
Cache<String, String> cache = defCacheManager.getCache();
cache.put("k1", "v1");
cache.put("k2", "v2");
//not yet in store (eviction.max-entries=2, LRU)
cache.put("k3", "v3");
assertEquals("v3", cache.get("k3"));
//now k1 evicted and stored in store
assertEquals(2, cache.size()); * only 2 entries should remain in cache, k1 should be passivated and removed. But doesn't work!*
{code}
was:
{code:title=Bar.java|borderStyle=solid}
GlobalConfiguration globalConf = new GlobalConfigurationBuilder().nonClusteredDefault().build();
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.clustering().cacheMode(CacheMode.LOCAL)
.loaders().passivation(true).preload(false).shared(false)
.addLoader(JdbcStringBasedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
.table()
.databaseType(DatabaseType.MYSQL)
.dropOnExit(false)
.createOnStart(true)
.tableNamePrefix("ISPN6Alpha2_STRING")
.idColumnName("ID").idColumnType("VARCHAR(255)")
.dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
.timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
.connectionPool()
.connectionUrl()
.username("username")
.password("password")
.driverClass("com.mysql.jdbc.Driver")
.eviction().strategy(EvictionStrategy.LRU).maxEntries(2);
Configuration localConf = builder.build();
DefaultCacheManager defCacheManager = new DefaultCacheManager(globalConf, localConf, true);
Cache<String, String> cache = defCacheManager.getCache();
cache.put("k1", "v1");
cache.put("k2", "v2");
//not yet in store (eviction.max-entries=2, LRU)
cache.put("k3", "v3");
assertEquals("v3", cache.get("k3"));
//now k1 evicted and stored in store
assertEquals(2, cache.size()); <<< only 2 entries should remain in cache, k1 should be passivated and removed. But doesn't work!
{code}
> Entry passivation doesn't work according to eviction strategy
> -------------------------------------------------------------
>
> Key: ISPN-3407
> URL: https://issues.jboss.org/browse/ISPN-3407
> Project: Infinispan
> Issue Type: Bug
> Components: Eviction
> Affects Versions: 6.0.0.Alpha2
> Reporter: Vitalii Chepeliuk
> Assignee: Mircea Markus
>
> {code:title=Bar.java|borderStyle=solid}
> GlobalConfiguration globalConf = new GlobalConfigurationBuilder().nonClusteredDefault().build();
> ConfigurationBuilder builder = new ConfigurationBuilder();
> builder.clustering().cacheMode(CacheMode.LOCAL)
> .loaders().passivation(true).preload(false).shared(false)
> .addLoader(JdbcStringBasedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
> .table()
> .databaseType(DatabaseType.MYSQL)
> .dropOnExit(false)
> .createOnStart(true)
> .tableNamePrefix("ISPN6Alpha2_STRING")
> .idColumnName("ID").idColumnType("VARCHAR(255)")
> .dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
> .timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
> .connectionPool()
> .connectionUrl()
> .username("username")
> .password("password")
> .driverClass("com.mysql.jdbc.Driver")
> .eviction().strategy(EvictionStrategy.LRU).maxEntries(2);
> Configuration localConf = builder.build();
> DefaultCacheManager defCacheManager = new DefaultCacheManager(globalConf, localConf, true);
> Cache<String, String> cache = defCacheManager.getCache();
> cache.put("k1", "v1");
> cache.put("k2", "v2");
> //not yet in store (eviction.max-entries=2, LRU)
> cache.put("k3", "v3");
> assertEquals("v3", cache.get("k3"));
> //now k1 evicted and stored in store
> assertEquals(2, cache.size()); * only 2 entries should remain in cache, k1 should be passivated and removed. But doesn't work!*
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months