[JBoss JIRA] (ISPN-1778) NullPointerException when putting into Cache
by Galder Zamarreño (JIRA)
Galder Zamarreño created ISPN-1778:
--------------------------------------
Summary: NullPointerException when putting into Cache
Key: ISPN-1778
URL: https://issues.jboss.org/browse/ISPN-1778
Project: Infinispan
Issue Type: Bug
Affects Versions: 5.1.0.CR4
Reporter: Galder Zamarreño
Assignee: Galder Zamarreño
Fix For: 5.1.0.FINAL
NPE thrown:
{code}16:06:31,680 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (http-localhost.localdomain-127.0.0.1-8080-4) ISPN000136: Execution error: java.lang.NullPointerException
at org.infinispan.commands.write.PutKeyValueCommand.perform(PutKeyValueCommand.java:82) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.CallInterceptor.handleDefault(CallInterceptor.java:83) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:61) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.DistributionInterceptor.handleWriteCommand(DistributionInterceptor.java:464) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.DistributionInterceptor.visitPutKeyValueCommand(DistributionInterceptor.java:274) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.EntryWrappingInterceptor.invokeNextAndApplyChanges(EntryWrappingInterceptor.java:199) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.EntryWrappingInterceptor.visitPutKeyValueCommand(EntryWrappingInterceptor.java:134) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitPutKeyValueCommand(NonTransactionalLockingInterceptor.java:68) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:61) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.StateTransferLockInterceptor.handleWithRetries(StateTransferLockInterceptor.java:201) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.StateTransferLockInterceptor.visitPutKeyValueCommand(StateTransferLockInterceptor.java:131) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:116) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:76) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:61) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:345) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:941) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.CacheImpl.put(CacheImpl.java:654) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.CacheImpl.put(CacheImpl.java:646) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
at org.infinispan.CacheSupport.put(CacheSupport.java:52) [infinispan-core-5.1.0.CR4.jar:5.1.0.CR4]
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] Created: (ISPN-755) Provide API documentation for scala components within the distribution
by Richard Achmatowicz (JIRA)
Provide API documentation for scala components within the distribution
----------------------------------------------------------------------
Key: ISPN-755
URL: https://jira.jboss.org/browse/ISPN-755
Project: Infinispan
Issue Type: Feature Request
Affects Versions: 4.1.0.Final
Reporter: Richard Achmatowicz
Assignee: Manik Surtani
Infinispan makes use of the Scala language to implement server modules for client-server communication. At present, these modules do not have any API documentation, which means that application developers must browse through the source code in order to find out which classes are available and what their interfaces are.
Scala has the ability to produce scaladoc documentation, but this is not compatible with javadoc. It appears that there is no method at present to incorporate scala API information into existing javadoc documentation.
The task of this issue is to investigate and implement a viable way to incorporate API information for the scala classes into the Infinispan distribution.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (ISPN-1808) Make InfiniSpan passivation faster
by Johann Burkard (JIRA)
Johann Burkard created ISPN-1808:
------------------------------------
Summary: Make InfiniSpan passivation faster
Key: ISPN-1808
URL: https://issues.jboss.org/browse/ISPN-1808
Project: Infinispan
Issue Type: Enhancement
Components: Loaders and Stores, Marshalling
Affects Versions: 5.1.0.FINAL, 5.1.0.CR4
Reporter: Johann Burkard
Assignee: Galder Zamarreño
While InfiniSpan is very fast in-memory, once passivation is turned on, things get slow for me.
On my i5-2400 with a Crucial C300 SSD, it takes about 11 ms to passivate a 2964 B value. This comes down to a write speed of 250 to 300 KB/s. The disk can write up to 180 MB/s so it's not the bottleneck.
Clearly, passivation should be faster than that.
Profiling with YourKit shows most of the hot spots are centered around {{FileCacheStore}}, the JBoss Marshalling library and various bucket and {{ImmortalCacheEntry}} methods. Locking also seems to play a role. Here's a screenshot:
!http://i.imgur.com/LzkPw.png!
To make profiling easier for you, I've taken my test case and turned it into a small Maven project. Simply running {{mvn install}} should run the test, ready for profiling.
Of course, it could also be that my configuration is suboptimal. However, in my experiments, many configurations were unusable (hitting the file handle limit), which is not a good thing.
The project is available at http://johannburkard.de/resources/Johann/infinispan-performance.zip
I've also found one or two other things I think are more costly than they would need to be
In {{FileCacheStore}}
{code}
byte[] buffer = new byte[streamBufferSize];
...
fileInStream = new FileInputStream(file);
...
bis = new BufferedInputStream(fileInStream);
...
bytesRead = bis.read(buffer, 0, streamBufferSize);
{code}
wrapping the {{FileInputStream}} in a {{BufferedInputStream}} is unnecessary because you already have a buffer in {{byte[] buffer}}. I think I have seen this before in InfiniSpan, so you might want to check for occurrences of {{BufferedInputStream}} or {{BufferedOutputStream}}.
Another one
{code}
if (bytes.length == 0) {
// Short circuit
if (f.exists()) f.delete();
return;
}
{code}
{{f.exists()}} is essentially a syscall. Just calling {{f.delete()}} is enough.
{code}
if (!root.exists()) {
if (!root.mkdirs()) {
log.problemsCreatingDirectory(root);
}
}
if (!root.exists()) {
throw new ConfigurationException("Directory " + root.getAbsolutePath() + " does not exist and cannot be created!");
}
{code}
This could also be shortened to
{code}
if (!root.mkdirs()) {
throw new ConfigurationException("Directory " + root.getAbsolutePath() + " does not exist and cannot be created!");
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (ISPN-2371) The global component registry sometimes fails to start components injected on the fly
by Dan Berindei (JIRA)
Dan Berindei created ISPN-2371:
----------------------------------
Summary: The global component registry sometimes fails to start components injected on the fly
Key: ISPN-2371
URL: https://issues.jboss.org/browse/ISPN-2371
Project: Infinispan
Issue Type: Bug
Components: Locking and Concurrency
Affects Versions: 5.2.0.Beta1
Reporter: Dan Berindei
Assignee: Mircea Markus
Priority: Critical
Fix For: 5.2.0.Final
If a global component is used by an incoming command, it could be created before the component registry is in the "running" state, yet after it has started invoking the components' start methods.
If this happens, the component's start method(s) will never be invoked - neither "inline", in ACR.registerComponentInternal, nor in the regular startup procedure (ACR.internalStart).
Specifically, the problem ocurred with LocalTopologyManager, which is injected in incoming CacheTopologyControlCommands. Since these commands are broadcasted to the entire cluster, a node can receive them before it had finished starting its global component registry.
--
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, 8 months
[JBoss JIRA] (ISPN-2429) Cache restart still doesn't work properly for query-enabled caches
by Marko Lukša (JIRA)
Marko Lukša created ISPN-2429:
---------------------------------
Summary: Cache restart still doesn't work properly for query-enabled caches
Key: ISPN-2429
URL: https://issues.jboss.org/browse/ISPN-2429
Project: Infinispan
Issue Type: Bug
Components: Querying
Affects Versions: 5.2.0.Beta2
Reporter: Marko Lukša
Assignee: Marko Lukša
In certain cases the restart of a stopped cache fails with "ConfigurationException: Detected interceptor of type [org.infinispan.query.backend.LocalQueryInterceptor] being added to the interceptor chain more than once!"
The error is caused by the fact that query.LifecycleManager stores the interceptor in Configuration.customInterceptorConfig on cache start, but doesn't remove it on cache stop.
This causes the interceptor to be added to the InterceptorChain automatically when the InterceptorChain is created (see InterceptorChainFactory.buildCustomInterceptors). When LifecycleManager then tries to add a new query interceptor to the chain, the exception is thrown.
In other cases, the order is reversed: the LifecycleManager is called first (before the InterceptorChainFactory). In these cases there is no error, because ICF.buildCustomInterceptors checks whether the interceptor of a certain type is already in the chain.
I wasn't able to modify QueryCacheRestartTest to make ICF build the chain before LifecycleManager.cacheStarting.
Here's the stacktrace of the error:
{code}
10:54:48,638 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.capedwarf.cache-lifecycle.search.capedwarf-test-a: org.jboss.msc.service.StartException in service jboss.capedwarf.cache-lifecycle.search.capedwarf-test-a: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
Caused by: org.infinispan.config.ConfigurationException: Detected interceptor of type [org.infinispan.query.backend.LocalQueryInterceptor] being added to the interceptor chain more than once!
at org.infinispan.interceptors.InterceptorChain.assertNotAdded(InterceptorChain.java:108)
at org.infinispan.interceptors.InterceptorChain.addInterceptorAfter(InterceptorChain.java:249)
at org.infinispan.query.impl.LifecycleManager.createQueryInterceptorIfNeeded(LifecycleManager.java:102)
at org.infinispan.query.impl.LifecycleManager.cacheStarting(LifecycleManager.java:78)
at org.infinispan.factories.ComponentRegistry.notifyCacheStarting(ComponentRegistry.java:210)
at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:196)
at org.infinispan.CacheImpl.start(CacheImpl.java:517)
at org.infinispan.AbstractDelegatingCache.start(AbstractDelegatingCache.java:343)
at org.jboss.as.capedwarf.services.CacheLifecycleService.start(CacheLifecycleService.java:79)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
... 3 more
{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
11 years, 8 months