[JBoss JIRA] (ISPN-2737) Thread naming anomaly when reporting lock timeout
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-2737?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-2737:
-----------------------------------
Git Pull Request: https://github.com/infinispan/infinispan/pull/1629 (was: https://github.com/galderz/infinispan/pull/new/t_2737)
> Thread naming anomaly when reporting lock timeout
> -------------------------------------------------
>
> Key: ISPN-2737
> URL: https://issues.jboss.org/browse/ISPN-2737
> Project: Infinispan
> Issue Type: Bug
> Components: Locking and Concurrency, RPC
> Affects Versions: 5.2.0.CR1
> Reporter: Michal Linhard
> Assignee: Galder Zamarreño
> Priority: Minor
> Fix For: 5.2.0.Final
>
>
> https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EDG6/view/EDG-REPOR...
> {code}
> 11:47:30,859 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (MemcachedServerWorker-277) ISPN000136: Execution error: org.infinispan.util.concurrent.TimeoutException: Unable to acquire lock after [3 seconds] on key [memcachedCache#key763328] for requestor [Thread[OOB-127,null,5,Thread Pools]]! Lock held by [Thread[OOB-150,null,5,Thread Pools]]
> at org.infinispan.util.concurrent.locks.LockManagerImpl.lock(LockManagerImpl.java:217) [infinispan-core-5.2.0.CR1-redhat-1.jar:5.2.0.CR1-redhat-1]
> at org.infinispan.util.concurrent.locks.LockManagerImpl.acquireLockNoCheck(LockManagerImpl.java:200) [infinispan-core-5.2.0.CR1-redhat-1.jar:5.2.0.CR1-redhat-1]
> at org.infinispan.interceptors.locking.AbstractLockingInterceptor.lockKey(AbstractLockingInterceptor.java:114) [infinispan-core-5.2.0.CR1-redhat-1.jar:5.2.0.CR1-redhat-1]
> ....
> at org.jgroups.protocols.MERGE2.up(MERGE2.java:205) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at org.jgroups.protocols.Discovery.up(Discovery.java:359) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at org.jgroups.protocols.TP$ProtocolAdapter.up(TP.java:2640) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at org.jgroups.protocols.TP.passMessageUp(TP.java:1287) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1850) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1823) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_38]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_38]
> at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_38]
> {code}
> note the thread name "MemcachedServerWorker" in an operation coming from the JGroups stack...
--
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
11 years, 11 months
[JBoss JIRA] (ISPN-2737) Thread naming anomaly when reporting lock timeout
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-2737?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-2737:
-----------------------------------
Status: Pull Request Sent (was: Coding In Progress)
Git Pull Request: https://github.com/galderz/infinispan/pull/new/t_2737
> Thread naming anomaly when reporting lock timeout
> -------------------------------------------------
>
> Key: ISPN-2737
> URL: https://issues.jboss.org/browse/ISPN-2737
> Project: Infinispan
> Issue Type: Bug
> Components: Locking and Concurrency, RPC
> Affects Versions: 5.2.0.CR1
> Reporter: Michal Linhard
> Assignee: Galder Zamarreño
> Priority: Minor
> Fix For: 5.2.0.Final
>
>
> https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EDG6/view/EDG-REPOR...
> {code}
> 11:47:30,859 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (MemcachedServerWorker-277) ISPN000136: Execution error: org.infinispan.util.concurrent.TimeoutException: Unable to acquire lock after [3 seconds] on key [memcachedCache#key763328] for requestor [Thread[OOB-127,null,5,Thread Pools]]! Lock held by [Thread[OOB-150,null,5,Thread Pools]]
> at org.infinispan.util.concurrent.locks.LockManagerImpl.lock(LockManagerImpl.java:217) [infinispan-core-5.2.0.CR1-redhat-1.jar:5.2.0.CR1-redhat-1]
> at org.infinispan.util.concurrent.locks.LockManagerImpl.acquireLockNoCheck(LockManagerImpl.java:200) [infinispan-core-5.2.0.CR1-redhat-1.jar:5.2.0.CR1-redhat-1]
> at org.infinispan.interceptors.locking.AbstractLockingInterceptor.lockKey(AbstractLockingInterceptor.java:114) [infinispan-core-5.2.0.CR1-redhat-1.jar:5.2.0.CR1-redhat-1]
> ....
> at org.jgroups.protocols.MERGE2.up(MERGE2.java:205) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at org.jgroups.protocols.Discovery.up(Discovery.java:359) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at org.jgroups.protocols.TP$ProtocolAdapter.up(TP.java:2640) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at org.jgroups.protocols.TP.passMessageUp(TP.java:1287) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1850) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1823) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_38]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_38]
> at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_38]
> {code}
> note the thread name "MemcachedServerWorker" in an operation coming from the JGroups stack...
--
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
11 years, 11 months
[JBoss JIRA] (ISPN-2756) Enabling/disabling RpcManager statistics via JMX doesn't work
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-2756?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration updated ISPN-2756:
------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=906236
> Enabling/disabling RpcManager statistics via JMX doesn't work
> -------------------------------------------------------------
>
> Key: ISPN-2756
> URL: https://issues.jboss.org/browse/ISPN-2756
> Project: Infinispan
> Issue Type: Bug
> Components: JMX, reporting and management
> Affects Versions: 5.2.0.CR2
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Fix For: 5.2.0.Final
>
>
> The test RpcManagerMBeanTest.testEnableJmxStats tries to write to the "StatisticsEnabled" attribute but fails. The operation doesn't throw an exception, but it does log this WARN message:
> {noformat}
> 10:43:42,079 WARN (testng-RpcManagerMBeanTest:) [ResourceDMBean] ISPN000043: Exception while writing value for attribute statisticsEnabled
> java.lang.NullPointerException
> at org.infinispan.jmx.ResourceDMBean$InvokableSetterBasedMBeanAttributeInfo.invoke(ResourceDMBean.java:391)
> at org.infinispan.jmx.ResourceDMBean.setNamedAttribute(ResourceDMBean.java:325)
> at org.infinispan.jmx.ResourceDMBean.setAttribute(ResourceDMBean.java:212)
> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.setAttribute(DefaultMBeanServerInterceptor.java:746)
> at com.sun.jmx.mbeanserver.JmxMBeanServer.setAttribute(JmxMBeanServer.java:729)
> at org.infinispan.jmx.RpcManagerMBeanTest.testEnableJmxStats(RpcManagerMBeanTest.java:134)
> {noformat}
> Because statistics are still enabled, the test then fails with an assertion error:
> {noformat}
> 10:43:42,464 ERROR (testng-RpcManagerMBeanTest:) [UnitTestTestNGListener] Test testEnableJmxStats(org.infinispan.jmx.RpcManagerMBeanTest) failed.
> java.lang.AssertionError: expected [-1] but found [1]
> at org.testng.Assert.fail(Assert.java:94)
> at org.testng.Assert.failNotEquals(Assert.java:494)
> at org.testng.Assert.assertEquals(Assert.java:123)
> at org.testng.Assert.assertEquals(Assert.java:165)
> at org.infinispan.jmx.RpcManagerMBeanTest.testEnableJmxStats(RpcManagerMBeanTest.java:138)
> {noformat}
--
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
11 years, 11 months
[JBoss JIRA] (ISPN-2756) Enabling/disabling RpcManager statistics via JMX doesn't work
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-2756?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-2756:
-----------------------------------------------
Anna Manukyan <amanukya(a)redhat.com> made a comment on [bug 906236|https://bugzilla.redhat.com/show_bug.cgi?id=906236]
Hi,
the test org.infinispan.jmx.RpcManagerMBeanTest.testEnableJmxStats always fails on all environments for ER10 build.
This bug is completely the same as the ISPN-2756 (in JIRA), but I run the tests for infinispan latest version and it works without failures, so issue refers only to JDG 6.1.0.ER10 build.
The log is:
2013-01-30 14:32:24,214 WARN [ResourceDMBean] (testng-RpcManagerMBeanTest) ISPN000043: Exception while writing value for attribute statisticsEnabled
java.lang.NullPointerException
at org.infinispan.jmx.ResourceDMBean$InvokableSetterBasedMBeanAttributeInfo.invoke(ResourceDMBean.java:391)
at org.infinispan.jmx.ResourceDMBean.setNamedAttribute(ResourceDMBean.java:325)
at org.infinispan.jmx.ResourceDMBean.setAttribute(ResourceDMBean.java:212)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.setAttribute(DefaultMBeanServerInterceptor.java:746)
at com.sun.jmx.mbeanserver.JmxMBeanServer.setAttribute(JmxMBeanServer.java:729)
at org.infinispan.jmx.RpcManagerMBeanTest.testEnableJmxStats(RpcManagerMBeanTest.java:134)
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)
[testng-RpcManagerMBeanTest] Test testEnableJmxStats(org.infinispan.jmx.RpcManagerMBeanTest) failed.
2013-01-30 14:32:24,217 ERROR [UnitTestTestNGListener] (testng-RpcManagerMBeanTest) Test testEnableJmxStats(org.infinispan.jmx.RpcManagerMBeanTest) failed.
java.lang.AssertionError: expected [-1] but found [1]
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:160)
at org.infinispan.jmx.RpcManagerMBeanTest.testEnableJmxStats(RpcManagerMBeanTest.java:138)
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)
Test suite progress: tests succeeded: 216, failed: 1, skipped: 0.
> Enabling/disabling RpcManager statistics via JMX doesn't work
> -------------------------------------------------------------
>
> Key: ISPN-2756
> URL: https://issues.jboss.org/browse/ISPN-2756
> Project: Infinispan
> Issue Type: Bug
> Components: JMX, reporting and management
> Affects Versions: 5.2.0.CR2
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Fix For: 5.2.0.Final
>
>
> The test RpcManagerMBeanTest.testEnableJmxStats tries to write to the "StatisticsEnabled" attribute but fails. The operation doesn't throw an exception, but it does log this WARN message:
> {noformat}
> 10:43:42,079 WARN (testng-RpcManagerMBeanTest:) [ResourceDMBean] ISPN000043: Exception while writing value for attribute statisticsEnabled
> java.lang.NullPointerException
> at org.infinispan.jmx.ResourceDMBean$InvokableSetterBasedMBeanAttributeInfo.invoke(ResourceDMBean.java:391)
> at org.infinispan.jmx.ResourceDMBean.setNamedAttribute(ResourceDMBean.java:325)
> at org.infinispan.jmx.ResourceDMBean.setAttribute(ResourceDMBean.java:212)
> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.setAttribute(DefaultMBeanServerInterceptor.java:746)
> at com.sun.jmx.mbeanserver.JmxMBeanServer.setAttribute(JmxMBeanServer.java:729)
> at org.infinispan.jmx.RpcManagerMBeanTest.testEnableJmxStats(RpcManagerMBeanTest.java:134)
> {noformat}
> Because statistics are still enabled, the test then fails with an assertion error:
> {noformat}
> 10:43:42,464 ERROR (testng-RpcManagerMBeanTest:) [UnitTestTestNGListener] Test testEnableJmxStats(org.infinispan.jmx.RpcManagerMBeanTest) failed.
> java.lang.AssertionError: expected [-1] but found [1]
> at org.testng.Assert.fail(Assert.java:94)
> at org.testng.Assert.failNotEquals(Assert.java:494)
> at org.testng.Assert.assertEquals(Assert.java:123)
> at org.testng.Assert.assertEquals(Assert.java:165)
> at org.infinispan.jmx.RpcManagerMBeanTest.testEnableJmxStats(RpcManagerMBeanTest.java:138)
> {noformat}
--
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
11 years, 11 months
[JBoss JIRA] (ISPN-2737) Thread naming anomaly when reporting lock timeout
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-2737?page=com.atlassian.jira.plugin.... ]
Work on ISPN-2737 started by Galder Zamarreño.
> Thread naming anomaly when reporting lock timeout
> -------------------------------------------------
>
> Key: ISPN-2737
> URL: https://issues.jboss.org/browse/ISPN-2737
> Project: Infinispan
> Issue Type: Bug
> Components: Locking and Concurrency, RPC
> Affects Versions: 5.2.0.CR1
> Reporter: Michal Linhard
> Assignee: Galder Zamarreño
> Priority: Minor
> Fix For: 5.2.0.Final
>
>
> https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EDG6/view/EDG-REPOR...
> {code}
> 11:47:30,859 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (MemcachedServerWorker-277) ISPN000136: Execution error: org.infinispan.util.concurrent.TimeoutException: Unable to acquire lock after [3 seconds] on key [memcachedCache#key763328] for requestor [Thread[OOB-127,null,5,Thread Pools]]! Lock held by [Thread[OOB-150,null,5,Thread Pools]]
> at org.infinispan.util.concurrent.locks.LockManagerImpl.lock(LockManagerImpl.java:217) [infinispan-core-5.2.0.CR1-redhat-1.jar:5.2.0.CR1-redhat-1]
> at org.infinispan.util.concurrent.locks.LockManagerImpl.acquireLockNoCheck(LockManagerImpl.java:200) [infinispan-core-5.2.0.CR1-redhat-1.jar:5.2.0.CR1-redhat-1]
> at org.infinispan.interceptors.locking.AbstractLockingInterceptor.lockKey(AbstractLockingInterceptor.java:114) [infinispan-core-5.2.0.CR1-redhat-1.jar:5.2.0.CR1-redhat-1]
> ....
> at org.jgroups.protocols.MERGE2.up(MERGE2.java:205) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at org.jgroups.protocols.Discovery.up(Discovery.java:359) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at org.jgroups.protocols.TP$ProtocolAdapter.up(TP.java:2640) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at org.jgroups.protocols.TP.passMessageUp(TP.java:1287) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1850) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1823) [jgroups-3.2.5.Final-redhat-1.jar:3.2.5.Final-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_38]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_38]
> at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_38]
> {code}
> note the thread name "MemcachedServerWorker" in an operation coming from the JGroups stack...
--
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
11 years, 11 months
[JBoss JIRA] (ISPN-2779) Lost data on remotecache get() after put()
by ThienLong Hong (JIRA)
[ https://issues.jboss.org/browse/ISPN-2779?page=com.atlassian.jira.plugin.... ]
ThienLong Hong updated ISPN-2779:
---------------------------------
Description:
I'm start server Infinispan on Ubuntu follow comand:
./startServer.sh -r hotrod -c infinispan-distribution.xml -l 192.168.23.120 -Djgroups.bind_addr=192.168.23.120
Make sure we can open many file, /etc/security/limits.conf:
* soft nofile 100002
* hard nofile 100002
Here is content of infinispan-distribution.xml:
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd"
xmlns="urn:infinispan:config:5.1">
<global>
<transport>
<properties>
<property name="configurationFile" value="jgroups-tcp.xml">
</property></properties>
</transport>
</global>
<default>
<clustering mode="distribution">
<sync />
<hash numOwners="2" />
</clustering>
</default>
<namedCache name="myCache">
<clustering mode="distribution">
<sync />
<hash numOwners="2" />
</clustering>
</namedCache>
<namedCache name="evictionCache">
<clustering mode="distribution">
<sync />
<hash numOwners="2" rehashEnabled="true" rehashRpcTimeout="600000" numVirtualNodes="50"/>
</clustering>
<eviction
maxEntries="10000"
strategy="LRU"
/>
<loaders passivation="true" preload="false">
<loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true" purgeOnStartup="false">
<properties>
<property name="location" value="data"/>
</properties>
</loader>
</loaders>
</namedCache>
</infinispan>
I write a simple program to test benmark of infinispan but i got problem of lost data. I put many key-value but when i retrieve it return null.
Here is my program soucecode:
package vn.vccorp.benmark.infinispan;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.net.URL;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Random;
import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import org.infinispan.client.hotrod.RemoteCache;
import org.infinispan.client.hotrod.RemoteCacheManager;
public class Benmark implements Callable<Void> {
private static final int MAX_LENGHT = 20;
private static final int MIN_LENGHT = 8;
private Map<String, String> accs = new LinkedHashMap<String, String>();
private final Random random = new Random(System.currentTimeMillis());
private RemoteCache<String, String> rc;
private boolean getOperator = false;
public Benmark(RemoteCache<String, String> rc, int numAcc) {
generateRandomAccs(numAcc);
this.rc = rc;
}
/**
* @param args
* @throws InterruptedException
*/
public static void main(String[] args) throws InterruptedException {
URL resource = Thread.currentThread().getContextClassLoader()
.getResource("hotrod-client.properties");
RemoteCacheManager rcm = new RemoteCacheManager(resource, true);
RemoteCache<String, String> rc = rcm.getCache("evictionCache");
List<Benmark> bens = new ArrayList<Benmark>();
int numThreads = Runtime.getRuntime().availableProcessors() * 2;
int numAccsPerThread = 5000;
for (int i = 0; i < numThreads; ++i) {
bens.add(new Benmark(rc, numAccsPerThread));
}
long time = testOperator(bens);
System.out.println("finish test Put with "
+ (numThreads * numAccsPerThread) + " records in "
+ (time) + "ns");
for (Benmark benmark : bens) {
benmark.setGetOperator(true);
}
time = testOperator(bens);
System.out.println("finish test Get with "
+ (numThreads * numAccsPerThread) + " records in "
+ (time) + "ns");
rcm.stop();
saveDataTest(bens);
}
private static void saveDataTest(List<Benmark> bens) {
PrintWriter writer = null;
try {
writer = new PrintWriter(new FileWriter("data_test.txt"));
for (Benmark ben : bens) {
for (Entry<String, String> entry : ben.getAccs().entrySet()) {
writer.println(entry.getKey());
writer.println(entry.getValue());
}
}
} catch (Exception e) {
// TODO: handle exception
} finally {
if (writer != null) {
writer.close();
}
}
}
private static long testOperator(List<Benmark> bens) throws InterruptedException {
ExecutorService pool = Executors.newCachedThreadPool();
long time = System.nanoTime();
pool.invokeAll(bens);
pool.shutdown();
while (!pool.awaitTermination(1, TimeUnit.MINUTES)) {
}
long end = System.nanoTime();
return end - time;
}
private void generateRandomAccs(int numberAcc) {
String user = null;
String pass = null;
for (int i = 0; i < numberAcc;) {
user = randomString();
pass = randomString();
if (getAccs().put(user, pass) == null) {
++i;
}
}
}
private String randomString() {
// int len = MIN_LENGHT + random.nextInt(MAX_LENGHT - MIN_LENGHT);
// StringBuilder builder = new StringBuilder(len);
// for (int i = 0; i < len; ++i) {
// char c = (char) (32 + random.nextInt(126 - 32));
// builder.append(c);
// }
// return builder.toString();
return UUID.randomUUID().toString();
}
@Override
public Void call() {
if (!getOperator) {
System.out.println("Start test PUT");
long startPut = System.nanoTime();
for (Entry<String, String> acc : getAccs().entrySet()) {
rc.put(acc.getKey(), acc.getValue());
}
long endPut = System.nanoTime();
System.out
.println("Finish test PUT: " + (endPut - startPut) + "ns");
} else {
System.out.println("Start test GET");
long startGet = System.nanoTime();
for (Entry<String, String> acc : getAccs().entrySet()) {
if (rc.get(acc.getKey()) == null) {
System.err.println("Error get data");
break;
}
}
long endGet = System.nanoTime();
System.out
.println("Finish test GET: " + (endGet - startGet) + "ns");
}
return null;
}
public boolean isGetOperator() {
return getOperator;
}
public void setGetOperator(boolean getOperator) {
this.getOperator = getOperator;
}
public Map<String, String> getAccs() {
return accs;
}
public void setAccs(Map<String, String> accs) {
this.accs = accs;
}
}
was:
I'm start server Infinispan follow comand:
./startServer.sh -r hotrod -c infinispan-distribution.xml -l 192.168.23.120 -Djgroups.bind_addr=192.168.23.120
Here is content of infinispan-distribution.xml:
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd"
xmlns="urn:infinispan:config:5.1">
<global>
<transport>
<properties>
<property name="configurationFile" value="jgroups-tcp.xml">
</property></properties>
</transport>
</global>
<default>
<clustering mode="distribution">
<sync />
<hash numOwners="2" />
</clustering>
</default>
<namedCache name="myCache">
<clustering mode="distribution">
<sync />
<hash numOwners="2" />
</clustering>
</namedCache>
<namedCache name="evictionCache">
<clustering mode="distribution">
<sync />
<hash numOwners="2" rehashEnabled="true" rehashRpcTimeout="600000" numVirtualNodes="50"/>
</clustering>
<eviction
maxEntries="10000"
strategy="LRU"
/>
<loaders passivation="true" preload="false">
<loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true" purgeOnStartup="false">
<properties>
<property name="location" value="data"/>
</properties>
</loader>
</loaders>
</namedCache>
</infinispan>
I write a simple program to test benmark of infinispan but i got problem of lost data. I put many key-value but when i retrieve it return null.
Here is my program soucecode:
package vn.vccorp.benmark.infinispan;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.net.URL;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Random;
import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import org.infinispan.client.hotrod.RemoteCache;
import org.infinispan.client.hotrod.RemoteCacheManager;
public class Benmark implements Callable<Void> {
private static final int MAX_LENGHT = 20;
private static final int MIN_LENGHT = 8;
private Map<String, String> accs = new LinkedHashMap<String, String>();
private final Random random = new Random(System.currentTimeMillis());
private RemoteCache<String, String> rc;
private boolean getOperator = false;
public Benmark(RemoteCache<String, String> rc, int numAcc) {
generateRandomAccs(numAcc);
this.rc = rc;
}
/**
* @param args
* @throws InterruptedException
*/
public static void main(String[] args) throws InterruptedException {
URL resource = Thread.currentThread().getContextClassLoader()
.getResource("hotrod-client.properties");
RemoteCacheManager rcm = new RemoteCacheManager(resource, true);
RemoteCache<String, String> rc = rcm.getCache("evictionCache");
List<Benmark> bens = new ArrayList<Benmark>();
int numThreads = Runtime.getRuntime().availableProcessors() * 2;
int numAccsPerThread = 5000;
for (int i = 0; i < numThreads; ++i) {
bens.add(new Benmark(rc, numAccsPerThread));
}
long time = testOperator(bens);
System.out.println("finish test Put with "
+ (numThreads * numAccsPerThread) + " records in "
+ (time) + "ns");
for (Benmark benmark : bens) {
benmark.setGetOperator(true);
}
time = testOperator(bens);
System.out.println("finish test Get with "
+ (numThreads * numAccsPerThread) + " records in "
+ (time) + "ns");
rcm.stop();
saveDataTest(bens);
}
private static void saveDataTest(List<Benmark> bens) {
PrintWriter writer = null;
try {
writer = new PrintWriter(new FileWriter("data_test.txt"));
for (Benmark ben : bens) {
for (Entry<String, String> entry : ben.getAccs().entrySet()) {
writer.println(entry.getKey());
writer.println(entry.getValue());
}
}
} catch (Exception e) {
// TODO: handle exception
} finally {
if (writer != null) {
writer.close();
}
}
}
private static long testOperator(List<Benmark> bens) throws InterruptedException {
ExecutorService pool = Executors.newCachedThreadPool();
long time = System.nanoTime();
pool.invokeAll(bens);
pool.shutdown();
while (!pool.awaitTermination(1, TimeUnit.MINUTES)) {
}
long end = System.nanoTime();
return end - time;
}
private void generateRandomAccs(int numberAcc) {
String user = null;
String pass = null;
for (int i = 0; i < numberAcc;) {
user = randomString();
pass = randomString();
if (getAccs().put(user, pass) == null) {
++i;
}
}
}
private String randomString() {
// int len = MIN_LENGHT + random.nextInt(MAX_LENGHT - MIN_LENGHT);
// StringBuilder builder = new StringBuilder(len);
// for (int i = 0; i < len; ++i) {
// char c = (char) (32 + random.nextInt(126 - 32));
// builder.append(c);
// }
// return builder.toString();
return UUID.randomUUID().toString();
}
@Override
public Void call() {
if (!getOperator) {
System.out.println("Start test PUT");
long startPut = System.nanoTime();
for (Entry<String, String> acc : getAccs().entrySet()) {
rc.put(acc.getKey(), acc.getValue());
}
long endPut = System.nanoTime();
System.out
.println("Finish test PUT: " + (endPut - startPut) + "ns");
} else {
System.out.println("Start test GET");
long startGet = System.nanoTime();
for (Entry<String, String> acc : getAccs().entrySet()) {
if (rc.get(acc.getKey()) == null) {
System.err.println("Error get data");
break;
}
}
long endGet = System.nanoTime();
System.out
.println("Finish test GET: " + (endGet - startGet) + "ns");
}
return null;
}
public boolean isGetOperator() {
return getOperator;
}
public void setGetOperator(boolean getOperator) {
this.getOperator = getOperator;
}
public Map<String, String> getAccs() {
return accs;
}
public void setAccs(Map<String, String> accs) {
this.accs = accs;
}
}
> Lost data on remotecache get() after put()
> ------------------------------------------
>
> Key: ISPN-2779
> URL: https://issues.jboss.org/browse/ISPN-2779
> Project: Infinispan
> Issue Type: Bug
> Components: Distributed Cache, Eviction, Loaders and Stores, Server
> Affects Versions: 5.1.6.FINAL, 5.2.0.CR3
> Environment: Windows 7SP1 Pro
> JDK 7 or JRE6
> Reporter: ThienLong Hong
> Assignee: Tristan Tarrant
>
> I'm start server Infinispan on Ubuntu follow comand:
> ./startServer.sh -r hotrod -c infinispan-distribution.xml -l 192.168.23.120 -Djgroups.bind_addr=192.168.23.120
> Make sure we can open many file, /etc/security/limits.conf:
> * soft nofile 100002
> * hard nofile 100002
> Here is content of infinispan-distribution.xml:
> <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd"
> xmlns="urn:infinispan:config:5.1">
> <global>
> <transport>
> <properties>
> <property name="configurationFile" value="jgroups-tcp.xml">
> </property></properties>
> </transport>
> </global>
> <default>
> <clustering mode="distribution">
> <sync />
> <hash numOwners="2" />
> </clustering>
> </default>
> <namedCache name="myCache">
> <clustering mode="distribution">
> <sync />
> <hash numOwners="2" />
> </clustering>
> </namedCache>
> <namedCache name="evictionCache">
> <clustering mode="distribution">
> <sync />
> <hash numOwners="2" rehashEnabled="true" rehashRpcTimeout="600000" numVirtualNodes="50"/>
> </clustering>
> <eviction
> maxEntries="10000"
> strategy="LRU"
> />
> <loaders passivation="true" preload="false">
> <loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true" purgeOnStartup="false">
> <properties>
> <property name="location" value="data"/>
> </properties>
> </loader>
> </loaders>
> </namedCache>
> </infinispan>
> I write a simple program to test benmark of infinispan but i got problem of lost data. I put many key-value but when i retrieve it return null.
> Here is my program soucecode:
> package vn.vccorp.benmark.infinispan;
> import java.io.FileWriter;
> import java.io.PrintWriter;
> import java.net.URL;
> import java.util.ArrayList;
> import java.util.LinkedHashMap;
> import java.util.List;
> import java.util.Map;
> import java.util.Map.Entry;
> import java.util.Random;
> import java.util.UUID;
> import java.util.concurrent.Callable;
> import java.util.concurrent.Executor;
> import java.util.concurrent.ExecutorService;
> import java.util.concurrent.Executors;
> import java.util.concurrent.TimeUnit;
> import org.infinispan.client.hotrod.RemoteCache;
> import org.infinispan.client.hotrod.RemoteCacheManager;
> public class Benmark implements Callable<Void> {
> private static final int MAX_LENGHT = 20;
> private static final int MIN_LENGHT = 8;
> private Map<String, String> accs = new LinkedHashMap<String, String>();
> private final Random random = new Random(System.currentTimeMillis());
> private RemoteCache<String, String> rc;
> private boolean getOperator = false;
> public Benmark(RemoteCache<String, String> rc, int numAcc) {
> generateRandomAccs(numAcc);
> this.rc = rc;
> }
> /**
> * @param args
> * @throws InterruptedException
> */
> public static void main(String[] args) throws InterruptedException {
> URL resource = Thread.currentThread().getContextClassLoader()
> .getResource("hotrod-client.properties");
> RemoteCacheManager rcm = new RemoteCacheManager(resource, true);
> RemoteCache<String, String> rc = rcm.getCache("evictionCache");
> List<Benmark> bens = new ArrayList<Benmark>();
> int numThreads = Runtime.getRuntime().availableProcessors() * 2;
> int numAccsPerThread = 5000;
> for (int i = 0; i < numThreads; ++i) {
> bens.add(new Benmark(rc, numAccsPerThread));
> }
> long time = testOperator(bens);
> System.out.println("finish test Put with "
> + (numThreads * numAccsPerThread) + " records in "
> + (time) + "ns");
> for (Benmark benmark : bens) {
> benmark.setGetOperator(true);
> }
> time = testOperator(bens);
> System.out.println("finish test Get with "
> + (numThreads * numAccsPerThread) + " records in "
> + (time) + "ns");
> rcm.stop();
> saveDataTest(bens);
> }
> private static void saveDataTest(List<Benmark> bens) {
> PrintWriter writer = null;
> try {
> writer = new PrintWriter(new FileWriter("data_test.txt"));
> for (Benmark ben : bens) {
> for (Entry<String, String> entry : ben.getAccs().entrySet()) {
> writer.println(entry.getKey());
> writer.println(entry.getValue());
> }
> }
> } catch (Exception e) {
> // TODO: handle exception
> } finally {
> if (writer != null) {
> writer.close();
> }
> }
> }
> private static long testOperator(List<Benmark> bens) throws InterruptedException {
> ExecutorService pool = Executors.newCachedThreadPool();
> long time = System.nanoTime();
> pool.invokeAll(bens);
> pool.shutdown();
> while (!pool.awaitTermination(1, TimeUnit.MINUTES)) {
> }
> long end = System.nanoTime();
> return end - time;
> }
> private void generateRandomAccs(int numberAcc) {
> String user = null;
> String pass = null;
> for (int i = 0; i < numberAcc;) {
> user = randomString();
> pass = randomString();
> if (getAccs().put(user, pass) == null) {
> ++i;
> }
> }
> }
> private String randomString() {
> // int len = MIN_LENGHT + random.nextInt(MAX_LENGHT - MIN_LENGHT);
> // StringBuilder builder = new StringBuilder(len);
> // for (int i = 0; i < len; ++i) {
> // char c = (char) (32 + random.nextInt(126 - 32));
> // builder.append(c);
> // }
> // return builder.toString();
> return UUID.randomUUID().toString();
> }
> @Override
> public Void call() {
> if (!getOperator) {
> System.out.println("Start test PUT");
> long startPut = System.nanoTime();
> for (Entry<String, String> acc : getAccs().entrySet()) {
> rc.put(acc.getKey(), acc.getValue());
> }
> long endPut = System.nanoTime();
> System.out
> .println("Finish test PUT: " + (endPut - startPut) + "ns");
> } else {
> System.out.println("Start test GET");
> long startGet = System.nanoTime();
> for (Entry<String, String> acc : getAccs().entrySet()) {
> if (rc.get(acc.getKey()) == null) {
> System.err.println("Error get data");
> break;
> }
> }
> long endGet = System.nanoTime();
> System.out
> .println("Finish test GET: " + (endGet - startGet) + "ns");
> }
> return null;
> }
> public boolean isGetOperator() {
> return getOperator;
> }
> public void setGetOperator(boolean getOperator) {
> this.getOperator = getOperator;
> }
> public Map<String, String> getAccs() {
> return accs;
> }
> public void setAccs(Map<String, String> accs) {
> this.accs = accs;
> }
> }
--
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
11 years, 11 months