Refactoring Infinispan documentation
by Manik Surtani
Guys
So one of the things coming soon is a revamped documentation site for Infinispan. I am thinking of moving to AsciiDoc [1] in place of our current Confluence [2] setup, so that documentation can be authored offline, page loads will be much faster, etc.
To see what the source files may look like, have a look at the source for this guide to TicketMonster [3] and the corresponding rendered output [4].
Now what I propose is a separate section in each maven module for documentation (e.g., core/src/docs and cachestores/cloud/src/docs, etc) which would contain an AsciiDoc page for each section.
Then a root 'docs' folder to contain the table of contents and other organisational attributes, and scripts in 'bin' to generate the documentation.
Further, I propose a separate git repository for the Infinispan website (which will be modernised and moved to Awestruct), which in turn will have build scripts to clone the infinispan repository, generate documentation, and publish documentation alongside the website.
Now this means the docs will not be editable online. So I propose again using Disqus [5] to allow people to comment on each page of documentation, which can then be updated as a pull request.
Thoughts, comments?
Cheers
Manik
[1] http://www.methods.co.nz/asciidoc/
[2] https://docs.jboss.org/author/display/ISPN/Home
[3] https://raw.github.com/jboss-jdf/jdf-collateral/master/scripts/ticket-mon...
[4] https://github.com/jboss-jdf/jdf-collateral/blob/master/scripts/ticket-mo...
[5] http://disqus.com/
--
Manik Surtani
manik(a)jboss.org
twitter.com/maniksurtani
Platform Architect, JBoss Data Grid
http://red.ht/data-grid
11 years, 9 months
NPE on boot when using preload
by Matej Lazar
To reproduce NPE start CapeDwarf twice with sample app and enabled preload for cache capedwarf/dist
<cache-container name="capedwarf" default-cache="default">
...
<distributed-cache name="dist" mode="ASYNC">
<transaction mode="NON_XA" locking="PESSIMISTIC"/>
<eviction strategy="LIRS" max-entries="100000"/>
<file-store preload="true" purge="false"/>
</distributed-cache>
After some debuging, find out that
in org.infinispan.distribution.DistributionManagerImpl.getLocality
stateTransferManager.getCacheTopology() returns null
https://github.com/infinispan/infinispan/blob/5.2.0.CR1/core/src/main/jav...
looks like onTopologyUpdate must be called first, but it is not
org.infinispan.statetransfer.StateConsumerImpl.onTopologyUpdate
https://github.com/infinispan/infinispan/blob/5.2.0.CR1/core/src/main/jav...
16:04:20,190 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) JBAS010281: Started metadata_todolist cache from capedwarf container
16:04:20,192 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-7) JBAS010281: Started memcache_todolist cache from capedwarf container
16:04:20,195 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-8) JBAS010281: Started data_todolist cache from capedwarf container
16:04:20,212 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (MSC service thread 1-2) ISPN000136: Execution error: java.lang.NullPointerException
at org.infinispan.distribution.DistributionManagerImpl.getLocality(DistributionManagerImpl.java:113) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.locking.ClusteringDependentLogic$DistributionLogic.localNodeIsOwner(ClusteringDependentLogic.java:181) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.locking.ClusteringDependentLogic$DistributionLogic.commitEntry(ClusteringDependentLogic.java:209) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.EntryWrappingInterceptor.commitContextEntry(EntryWrappingInterceptor.java:270) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.EntryWrappingInterceptor.commitEntryIfNeeded(EntryWrappingInterceptor.java:371) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.EntryWrappingInterceptor.commitContextEntries(EntryWrappingInterceptor.java:257) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.EntryWrappingInterceptor.visitPrepareCommand(EntryWrappingInterceptor.java:108) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.invokeNextAndCommitIf1Pc(AbstractTxLockingInterceptor.java:107) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.locking.PessimisticLockingInterceptor.visitPrepareCommand(PessimisticLockingInterceptor.java:103) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:58) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.TxInterceptor.invokeNextInterceptorAndVerifyTransaction(TxInterceptor.java:131) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:118) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.statetransfer.StateTransferInterceptor.handleTopologyAffectedCommand(StateTransferInterceptor.java:216) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.statetransfer.StateTransferInterceptor.handleTxCommand(StateTransferInterceptor.java:189) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.statetransfer.StateTransferInterceptor.visitPrepareCommand(StateTransferInterceptor.java:93) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:128) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:92) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:132) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:343) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:175) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.transaction.synchronization.SynchronizationAdapter.afterCompletion(SynchronizationAdapter.java:81) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:103)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
at org.infinispan.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1156) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.CacheImpl.putInternal(CacheImpl.java:744) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.CacheImpl.put(CacheImpl.java:738) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.DecoratedCache.put(DecoratedCache.java:180) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.loaders.CacheLoaderManagerImpl.preload(CacheLoaderManagerImpl.java:258) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09-icedtea]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09-icedtea]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09-icedtea]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09-icedtea]
at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:203) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:883) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:654) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:643) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:546) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:199) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.CacheImpl.start(CacheImpl.java:557) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:689) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:652) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:548) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:562) [infinispan-core-5.2.0.CR1.jar:5.2.0.CR1]
at org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.getCache(DefaultEmbeddedCacheManager.java:107) [jboss-as-clustering-infinispan-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
at org.jboss.as.capedwarf.services.CacheLifecycleService.start(CacheLifecycleService.java:82) [jboss-as-capedwarf-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.3.GA.jar:1.0.3.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.3.GA.jar:1.0.3.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_09-icedtea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09-icedtea]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09-icedtea]
Matej.
11 years, 9 months
Question about replication with 5.2.0.CR1
by Randall Hauch
I'm trying to debug some problems that ModeShape is having in clustered situations when using 5.2.0.CR1. I don't have a standalone test case, but hopefully I can explain what I'm doing.
I'm working with a replicated cache and two processes. The cache configuration (see attached) uses a cache store (with fetchPersistentState=true) and eviction (though the value of 'maxEntries' is high enough that neither process hits it).
The first process starts up fine and both ModeShape and Infinispan work fine. After some period of time (~20 seconds), I start up the second process. It joins the cluster, and receives the initial state transfer from the first process. I can see from the logs that an entry with a particular key has been transferred and is complete. The second process (as part of the ModeShape initialization code) attempts to look up the entry with this particular key, but it doesn't find it. At this point, ModeShape starts mis-behaving because this particular entry is critical in knowing if ModeShape needs to initialize the repository content (by creating several hundred entries). Upon finding no such node, it attempts to recreate it and a hundred other entries. Some succeed, but others fail because existing entries are found when they weren't expected to be found. I've replicated this problem on two different machines with different operating systems.
We're using explicit locks for writes, and we're using a cache with SKIP_REMOTE_LOOKUP and DELTA_WRITE flags when writing, but no particular flags when reading. (See below for why we're using these flags.)
My understanding is that, once the initial state transfer completes, the second process' cache store should contain all of the transferred entries, and any attempt to look up an entry by key will obviously check local memory and, if not found, will consult the cache store.
I've attached the log file for this second process. Here are some of the key points in the file:
1) Starting with line 39, the log shows that the cache is started, joins the existing cluster, and waits for the initial state transfer. This is follows by lots of lines showing the details of the state transfer.
2) On line 159, one of the state transfer DEBUG lines shows a PutKeyValueCommand with the entry of interest, with key "cb80206317f1e7jcr:system" and who's value looks as expected:
OOB-1,Machine1-27258 2013-01-11 11:31:26,819 TRACE statetransfer.StateTransferInterceptor - handleTopologyAffectedCommand for command PutKeyValueCommand{key=cb80206317f1e7jcr:system, value=SchematicEntryLiteral{ "metadata" : { "id" : "cb80206317f1e7jcr:system" , "contentType" : "application/json" } , "content" : { "key" : "cb80206317f1e7jcr:system" , "parent" : [ "cb80206317f1e7/" , "cb80206cd556c0/" ] , "properties" : { "http://www.jcp.org/jcr/1.0" : { "primaryType" : { "$name" : "mode:system" } } } , "children" : [ { "key" : "cb80206317f1e7jcr:nodeTypes" , "name" : "jcr:nodeTypes" } , { "key" : "cb80206317f1e7jcr:versionStorage" , "name" : "jcr:versionStorage" } , { "key" : "cb80206317f1e7mode:namespaces" , "name" : "mode:namespaces" } , { "key" : "cb80206317f1e7mode:locks" , "name" : "mode:locks" } , { "key" : "cb80206317f1e7mode:synchronizedInitialization" , "name" : "mode:repository" } ] , "childrenInfo" : { "count" : 5 } } }, flags=[CACHE_MODE_LOCAL, SKIP_REMOTE_LOOKUP, PUT_FOR_STATE_TRANSFER, SKIP_SHARED_CACHE_STORE, SKIP_OWNERSHIP_CHECK, IGNORE_RETURN_VALUES, SKIP_XSITE_BACKUP], putIfAbsent=false, lifespanMillis=-1, maxIdleTimeMillis=-1, successful=true}
3) On line 673, the log shows that state transfer was completed.
4) On line 700, ModeShape calls "cache.get(…)" with the "cb80206317f1e7/" key, and this entry is successfully found:
com.pb.spring.Main.main() 2013-01-11 11:31:27,667 TRACE statetransfer.StateTransferInterceptor - handleTopologyAffectedCommand for command GetKeyValueCommand {key=cb80206317f1e7/, flags=null}
5) On line 704, ModeShape calls "cache.get(…)" with the "cb80206317f1e7jcr:system" key, but this entry is not found:
com.pb.spring.Main.main() 2013-01-11 11:31:27,687 TRACE statetransfer.StateTransferInterceptor - handleTopologyAffectedCommand for command GetKeyValueCommand {key=cb80206317f1e7jcr:system, flags=null}
I don't understand why this happens. I understand why the cache doesn't find it in memory, but why doesn't it consult the cache store? Am I missing a specific flag?
Here's a bit of background. Our SchematicEntryLiteral values are DeltaAware, and we've patterned the code after AtomicHashMap to get the MVCC-style behavior, but our SchematicEntryLiteral values contain JSON-like documents. All of our code can be seen at [1]. Notice our SchematicEntryProxy, and the two Delta implementations. We're using explicit locks for writes, and we're using a cache with SKIP_REMOTE_LOOKUP and DELTA_WRITE flags when writing, but no particular flags when reading.
BTW, ModeShape creates two cache containers. One of them (created from the "spectrum-workspace-cache.xml" configuration file) is used only for local in-memory caches that use eviction and no persistence; this cache is not really of concern.
Thanks in advance!
Randall Hauch
[1] https://github.com/rhauch/modeshape/tree/1e0db548891a8355651654d0880553b2...
11 years, 9 months
Integrating MongoDB CacheStore
by Sanne Grinovero
Hi all,
I'd like to integrate Guillaume's work with MongoDB integration soon,
but since we're in CR phases I need some advice.
Shall we wait after Final for the next development cycle, or maybe
merge it and mark as experimental?
If this needs to be kept out of 5.2 then I'm look forward for a new
branch where we can merge such works.
Same question for the Lucene4 support, which also will be ready soon.
Cheers,
Sanne
11 years, 9 months
Infinispan Directory Lucene 4 Support
by Gerald Blanck
Will Infinsipan Directory support Lucene 4, and if so, when?
Thanks.
--
*Gerald Blanck*
baro*m*eter*IT*
1331 Tyler Street NE, Suite 100
Minneapolis, MN 55413
612.208.2802
gerald.blanck(a)barometerit.com
11 years, 9 months