plans for release?
by Sanne Grinovero
Hello all,
are there imminent plans for a release of 4.2.1, and are we going to see a CR2 ?
Regards,
Sanne
13 years, 4 months
JoinTask.broadcastNewCh
by Mircea Markus
Hi,
This is something Bela has brought up while working on integrating RELAY in infinispan.
Right now it's the joiner (JoinTask) that broadcast the new CH to the cluster members. In the case of RELAY, this wouldn't be that good as the joiner might be on a remote site and this means a potentially costly RPC.
Isn't it possible for all the existing members to determine the new CH internally on the @viewChanged call and not wait for new joiner's broadcast?
The change I've made in the code to do that[1] caused lots of intermittent failure, so before digging further - is there's something I miss which makes this approach not to work?
Cheers,
Mircea
[1] https://github.com/mmarkus/infinispan/tree/auto_ch_m
13 years, 4 months
Flag(s) being ignored on remote nodes
by Sanne Grinovero
Using the following sequence, using REPL_SYNC:
[thread-A] nodeOne.put(K1, V1);
[thread-B] nodeTwo.startBatch();
[thread-B] nodeTwo.remove(K1);
[thread-A] nodeOne.withFlags(Flag.SKIP_LOCKING).remove(K1);
At the last line, thread-B is blocked waiting to end the batch to
after thread-A finished. This results in thread-A to throw a
"org.infinispan.util.concurrent.TimeoutException: Unable to acquire
lock after [500 milliseconds] on key"
Still if I run the same sequence of operation on two different threads
on the same node, this will work just fine and not throw any error:
[thread-A] nodeOne.put(K1, V1);
[thread-B] nodeOne.startBatch();
[thread-B] nodeOne.remove(K1);
[thread-A] nodeOne.withFlags(Flag.SKIP_LOCKING).remove(K1);
Looking into org.infinispan.interceptors.ReplicationInterceptor.handleCrudMethod(InvocationContext,
WriteCommand), it seems that any Flag is not sent to remove nodes.
Actually the whole org.infinispan.remoting.rpc.RpcManager interface is
not interested in Flags.
This looks like to me a critical issue, or am I missing some design requirement?
Regards,
Sanne
13 years, 4 months
Using nio and/or aio for FileCacheStore
by Tristan Tarrant
Dear all,
has anybody looked into using either nio or aio for the FileCacheStore to
improve its performance ?
I was thinking of working a little on this for fun.
Tristan
13 years, 4 months
How Infinispan can be used as data grid?
by Vinay Ananth Raichur
Please give any pointers or links for the sample demo(s) OR code to understand Infinispan from perspective of the usage of Data Grid.
Thanks a lot!
Cheers,
Vinay
DISCLAIMER: This email message and all attachments are confidential and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this email is strictly prohibited. If you have received this email in error, please notify us immediately by return email or to mailadmin(a)spanservices.com and destroy the original message. Opinions, conclusions and other information in this message that do not relate to the official business of SPAN, shall be understood to be neither given nor endorsed by SPAN.
13 years, 4 months
Replicated caches and initial state transfer
by Tristan Tarrant
Dear all,
I recently spent some time tracking a problem with my Infinispan-using
application related to replicated caches (I appeared briefly on IRC
yesterday with this issue). I finally managed to solve my problem by
enabling <stateTransferRetrieval fetchInMemoryState="true" /> which I
thought would have been a more obvious, if less performant, default. Why was
the decision to disable initial state replication made ?
Thanks
Tristan
13 years, 4 months
Unbalanced lock releases
by Sanne Grinovero
Hello all,
I am getting an "IllegalMonitorStateException" while Infinispan
attempts to release a lock it doesn't own, basically at:
org.infinispan.container.EntryFactoryImpl.wrapEntryForWriting(EntryFactoryImpl.java:178
(I was using SKIP_LOCKING, so lockAcquired is false at this point).
I tried to fix it introducing an "if (lockAcquired)" in line 178, but
then the situation seems worse:
In "LockManagerImpl", line 174, reads:
boolean needToUnlock = possiblyLocked(entry)
where the javadoc of possiblyLocked reads:
"Inspects the entry for signs that it is possibly locked, and hence
would need to be unlocked. Note that this is not deterministic, and is
pessimistic in that even if an entry is not locked but *might* be
locked, this will return true.
As such, this should only be used to determine whether *unlocking* is
necessary, not whether locking is necessary. Unlocking an entry that
has not been locked has no effect, so this is just an optimisation. "
Still, some assumption seems wrong here as I'm experiencing the
following stacktrace :
java.lang.IllegalMonitorStateException
at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:127)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1239)
at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)
at org.infinispan.util.concurrent.locks.containers.AbstractStripedLockContainer.releaseLock(AbstractStripedLockContainer.java:97)
at org.infinispan.util.concurrent.locks.LockManagerImpl.unlock(LockManagerImpl.java:111)
at org.infinispan.util.concurrent.locks.LockManagerImpl.releaseLocks(LockManagerImpl.java:183)
at org.infinispan.interceptors.LockingInterceptor.cleanupLocks(LockingInterceptor.java:407)
at org.infinispan.interceptors.LockingInterceptor.cleanLocksAndRethrow(LockingInterceptor.java:412)
at org.infinispan.interceptors.LockingInterceptor.visitReplaceCommand(LockingInterceptor.java:340)
at org.infinispan.commands.write.ReplaceCommand.acceptVisitor(ReplaceCommand.java:59)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132)
at org.infinispan.commands.AbstractVisitor.visitReplaceCommand(AbstractVisitor.java:66)
at org.infinispan.commands.write.ReplaceCommand.acceptVisitor(ReplaceCommand.java:59)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:184)
at org.infinispan.interceptors.TxInterceptor.visitReplaceCommand(TxInterceptor.java:142)
at org.infinispan.interceptors.DistTxInterceptor.visitReplaceCommand(DistTxInterceptor.java:90)
at org.infinispan.commands.write.ReplaceCommand.acceptVisitor(ReplaceCommand.java:59)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:87)
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:58)
at org.infinispan.commands.AbstractVisitor.visitReplaceCommand(AbstractVisitor.java:66)
at org.infinispan.commands.write.ReplaceCommand.acceptVisitor(ReplaceCommand.java:59)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:273)
at org.infinispan.CacheDelegate.replace(CacheDelegate.java:475)
at org.infinispan.CacheSupport.replace(CacheSupport.java:96)
at org.infinispan.lucene.readlocks.DistributedSegmentReadLocker.acquireReadLock(DistributedSegmentReadLocker.java:146)
at org.infinispan.lucene.readlocks.StressTestReadLocksTest$LockUser.run(StressTestReadLocksTest.java:74)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
It's totally possible that the exception wouldn't happen without my
"fix" mentioned above, but then I get the IllegalMonitorStateException
earlier.
Any hint?
I'm sharing my failing testcase on GitHub, branch
"IllegalMonitorStateException", forked from 4.2.x :
https://github.com/Sanne/infinispan/tree/IllegalMonitorStateException
Cheers,
Sanne
13 years, 4 months
Comments on tutorials etc.
by Pete Muir
As part of getting up to speed with infinispan, I've been running through the docs and tutorials. Some thoughts
1) http://www.jboss.org/infinispan/downloads.html
One thing that is always annoying is having to configure the jboss repo. I suggest adding this snippet to the above page for people to copy, which can be pasted into either the pom, or into settings.xml, and is self contained.
<profiles>
<profile>
<id>jboss-public-repository</id>
<activation>
<property>
<name>jboss-public-repository</name>
<value>!false</value>
</property>
</activation>
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
2) http://www.jboss.org/infinispan/downloads.html
Suggest adding two code snippet for the dependency too:
a)
<properties>
<infinispan.version>X.Y.Z.Q</infinispan.version>
</properties>
b)
<dependencies>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
<version>${infinispan.version}</version>
</dependency>
</dependencies>
3) http://community.jboss.org/wiki/5minutetutorialonInfinispan
Cache cache = manager.getCache();
I get a warning with this line in Eclipse, as Cache should be a parameterized type. Doesn't break stuff, but doesn't look good that we advise people to write incorrect code.
4) http://community.jboss.org/wiki/5minutetutorialonInfinispan
To make this totally fool proof, might want to indicate how people can run this, e.g. in a main method on a class. This also really highlights how "lightweight" this stuff is (no need for a big server etc.)
5) http://community.jboss.org/wiki/5minutetutorialonInfinispan
For the expiration, might want to adjust the values a bit. 60s is a long time to wait, and also setting the expiration to 60s, and the thread sleep to 60s is risking the assertion failing (it did for me). I would suggest something more like 5s expiration, 10s sleep.
6) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
This information is really useful, and I would suggest splitting out the groovy bit and then adding a link from the 5 min tutoiral
7) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
Some of the instructions on this page could be clearer if they all built as code blocks. For example, following the groovy ones, I struggled reading the first paragraph, it would have been helpful to split this up and provide code snippets to use like:
$> cp $INFINISPAN_HOME/infinispan-core.jar ~/.groovy/lib/
etc.
8) http://community.jboss.org/wiki/InstallingInfinispantutorialenvironment
The location of infinispan-core jars and dependencies has changed from $INFNISPAN_HOME/modules/core to $INIFINISPAN_HOME, the tutorial needs updating
9) http://community.jboss.org/wiki/Infinispaninteractivetutorial
When doing the below line, I get an error:
And now, create a cache manager indicating the file with the cache definitions.
groovy:000> manager = new DefaultCacheManager("sample-configurations.xml"
)
===> org.infinispan.manager.DefaultCacheManager@19cc1b@Address:
null
oovy:000> manager = new DefaultCacheManager("/Users/pmuir/Downloads/sample-configurations.xml")
ERROR java.io.IOException:
null
at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:264)
at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:282)
at org.infinispan.config.InfinispanConfiguration.newInfinispanConfiguration (InfinispanConfiguration.java:136)
at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:243)
at org.infinispan.manager.DefaultCacheManager.<init> (DefaultCacheManager.java:229)
at groovysh_evaluate.run (groovysh_evaluate:4)
and I don't know how to get past it, so I stopped this tutorial here.
10) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
Could do with some comments explaining what each line is doing, some of the code isn't self describing
e.g.
what does me entering val defaultCache = manager.getCache[String, String]() actually achieve?
11) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
It might be neat to split up input and output e.g. into different snippets - make it easier to read
12) http://community.jboss.org/wiki/InfinispanInteractiveTutorialwithScala
For "Cache with Transaction Management" I was not seeing TX semantics being obeyed, I saw the size increment as a added key-value pairs
13) http://community.jboss.org/wiki/SettingupanInfinispanCluster
When I do gc.setTransportClass(JGroupsTransport.class.getName()); and import JGroupsTransport I get two options, one from Infinispan and one from JGroups, tutorial should saw which to import.
14) http://community.jboss.org/wiki/SettingupanInfinispanCluster
The CacheManager is deprecated, I guess these needs updating to 4.2 API?
15) http://community.jboss.org/wiki/SettingupanInfinispanCluster
I would suggest adding some instructions about how to do a simple test to see the cluster working, atm the tutorial seems to end in middle of something. There are hints in the comment, but nothing concrete
13 years, 4 months
Cache stop timeout for on-going transactions
by Galder Zamarreño
Hi,
I've got a solution for https://issues.jboss.org/browse/ISPN-915 which involves TransactionTable waiting for some time before giving up waiting on on-going txs.
Clearly, this wait time should be configurable and I was suggesting something like:
<transaction stopTimeout="30000"/>
What should be the default value for it? 30s Ok?
WDYT?
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
13 years, 4 months
Introducing JGroups scopes
by Vladimir Blagojevic
Hey,
JGroups scopes [1] have been implemented for a while now and we should
think about using them in Infinispan. I looked around a bit to see how
we can use scope and satisfy requirements Manik outlined [2]. I think a
good idea would be to introduce scope method in InvocationContext? We
can start by implementing scope to return hash of cache name where
invocation originated and subsequently refine this scope by adding
GlobalTransaction and so on. Users, if they really need to scope their
calls could do so by attaching additional markers to InvocationContext
or smth similar.
WDYT?
[1]https://issues.jboss.org/browse/JGRP-822
[2]https://issues.jboss.org/browse/ISPN-3
13 years, 4 months