[JBoss JIRA] (ISPN-2656) Support RemoteCache.keySet()
by Ray Tsang (JIRA)
Ray Tsang created ISPN-2656:
-------------------------------
Summary: Support RemoteCache.keySet()
Key: ISPN-2656
URL: https://issues.jboss.org/browse/ISPN-2656
Project: Infinispan
Issue Type: Feature Request
Components: Remote protocols
Reporter: Ray Tsang
Assignee: Galder Zamarreño
RemoteCache doesn't support keySet() method. A workaround is to use getBulk(). However, getBulk() returns both keys and values, which would be impractical with large dataset.
--
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
12 years
[JBoss JIRA] (ISPN-2655) Make HotRod client always read from the main data owner
by Mircea Markus (JIRA)
[ https://issues.jboss.org/browse/ISPN-2655?page=com.atlassian.jira.plugin.... ]
Mircea Markus updated ISPN-2655:
--------------------------------
Fix Version/s: 5.2.0.Final
> Make HotRod client always read from the main data owner
> -------------------------------------------------------
>
> Key: ISPN-2655
> URL: https://issues.jboss.org/browse/ISPN-2655
> Project: Infinispan
> Issue Type: Feature Request
> Affects Versions: 5.2.0.Beta6
> Reporter: Mircea Markus
> Assignee: Tristan Tarrant
> Fix For: 5.2.0.CR1, 5.2.0.Final
>
>
> ISPN-2643 made the java Hot Rod client always write to the main owner. ATM the client picks a random owner for reading though. This read-load-balancing doesn't really help, as assuming the data is evenly spread, the amount of reads would be distributed uniformly across the cluster. OTOH forcing the client to always read from the main owner would guarantee red-consistency for *async* replicated caches. Even so read consistency might still be a problem when a node crashed, but still these is a much stronger guarantee and makes async replication usable in many more scenarios.
--
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
12 years
[JBoss JIRA] (ISPN-2655) Make HotRod client always read from the main data owner
by Mircea Markus (JIRA)
Mircea Markus created ISPN-2655:
-----------------------------------
Summary: Make HotRod client always read from the main data owner
Key: ISPN-2655
URL: https://issues.jboss.org/browse/ISPN-2655
Project: Infinispan
Issue Type: Feature Request
Affects Versions: 5.2.0.Beta6
Reporter: Mircea Markus
Assignee: Tristan Tarrant
Fix For: 5.2.0.CR1
ISPN-2643 made the java Hot Rod client always write to the main owner. ATM the client picks a random owner for reading though. This read-load-balancing doesn't really help, as assuming the data is evenly spread, the amount of reads would be distributed uniformly across the cluster. OTOH forcing the client to always read from the main owner would guarantee red-consistency for *async* replicated caches. Even so read consistency might still be a problem when a node crashed, but still these is a much stronger guarantee and makes async replication usable in many more scenarios.
--
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
12 years
[JBoss JIRA] (ISPN-2392) Optimize locking behaviour in non-transactional caches
by Mircea Markus (JIRA)
[ https://issues.jboss.org/browse/ISPN-2392?page=com.atlassian.jira.plugin.... ]
Mircea Markus commented on ISPN-2392:
-------------------------------------
ISPN-2552 solved this problem for distributed caches. For replicated caches you can use a degenerated cache of distributed caches by setting numOwners to a very high value(e.g. 10000 given that your cluster doesn't have that many nodes).
> Optimize locking behaviour in non-transactional caches
> ------------------------------------------------------
>
> Key: ISPN-2392
> URL: https://issues.jboss.org/browse/ISPN-2392
> Project: Infinispan
> Issue Type: Enhancement
> Components: Locking and Concurrency
> Affects Versions: 5.2.0.Beta1
> Reporter: Thomas Fromm
> Assignee: Mircea Markus
>
> Situation: REPL_SYNC cache, non transactional, locking isolation level NONE
> Problem: when multiple threads trying to write same key on multiple nodes, the operation ends up mostly in locking timeouts
> Mircea mentioned that the locking behaviour for non-tx caches could be optimized as well as for tx-caches or use the same mechanisms.
> (One single lock, independed number of owners)
--
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
12 years
[JBoss JIRA] (ISPN-2240) Per-key lock container leads to superfluous TimeoutExceptions on concurrent access to same key
by Mircea Markus (JIRA)
[ https://issues.jboss.org/browse/ISPN-2240?page=com.atlassian.jira.plugin.... ]
Mircea Markus updated ISPN-2240:
--------------------------------
Fix Version/s: (was: 5.2.0.CR1)
> Per-key lock container leads to superfluous TimeoutExceptions on concurrent access to same key
> ----------------------------------------------------------------------------------------------
>
> Key: ISPN-2240
> URL: https://issues.jboss.org/browse/ISPN-2240
> Project: Infinispan
> Issue Type: Bug
> Components: Locking and Concurrency
> Affects Versions: 5.1.6.FINAL, 5.1.x
> Reporter: Robert Stupp
> Assignee: Mircea Markus
> Priority: Critical
> Fix For: 5.2.0.Final
>
> Attachments: ISPN-2240_fix_TimeoutExceptions.patch, somehow.zip
>
>
> Hi,
> I've encountered a lot of TimeoutExceptions just running a load test against an infinispan cluster.
> I tracked down the reason and found out, that the code in org.infinispan.util.concurrent.locks.containers.AbstractPerEntryLockContainer#releaseLock() causes these superfluous TimeoutExceptions.
> A small test case (which just prints out timeouts, too late timeouts and "paints" a lot of dots to the console - more dots/second on the console means better throughput ;-)
> In a short test I extended the class ReentrantPerEntryLockContainer and changed the implementation of releaseLock() as follows:
> {noformat}
> public void releaseLock(Object lockOwner, Object key) {
> ReentrantLock l = locks.get(key);
> if (l != null) {
> if (!l.isHeldByCurrentThread())
> throw new IllegalStateException("Lock for [" + key + "] not held by current thread " + Thread.currentThread());
> while (l.isHeldByCurrentThread())
> unlock(l, lockOwner);
> if (!l.hasQueuedThreads())
> locks.remove(key);
> }
> else
> throw new IllegalStateException("No lock for [" + key + ']');
> }
> {noformat}
> The main improvement is that locks are not removed from the concurrent map as long as other threads are waiting on that lock.
> If the lock is removed from the map while other threads are waiting for it, they may run into timeouts and force TimeoutExceptions to the client.
> The above methods "paints more dots per second" - means: it gives a better throughput for concurrent accesses to the same key.
> The re-implemented method should also fix some replication timeout exceptions.
> Please, please add this to 5.1.7, if possible.
--
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
12 years
[JBoss JIRA] (ISPN-2240) Per-key lock container leads to superfluous TimeoutExceptions on concurrent access to same key
by Mircea Markus (JIRA)
[ https://issues.jboss.org/browse/ISPN-2240?page=com.atlassian.jira.plugin.... ]
Mircea Markus commented on ISPN-2240:
-------------------------------------
As per Manik, this shouldn't be an issue anymore given the locking fixes in this release. We need to run the test, check and close it though.
> Per-key lock container leads to superfluous TimeoutExceptions on concurrent access to same key
> ----------------------------------------------------------------------------------------------
>
> Key: ISPN-2240
> URL: https://issues.jboss.org/browse/ISPN-2240
> Project: Infinispan
> Issue Type: Bug
> Components: Locking and Concurrency
> Affects Versions: 5.1.6.FINAL, 5.1.x
> Reporter: Robert Stupp
> Assignee: Mircea Markus
> Priority: Critical
> Fix For: 5.2.0.Final
>
> Attachments: ISPN-2240_fix_TimeoutExceptions.patch, somehow.zip
>
>
> Hi,
> I've encountered a lot of TimeoutExceptions just running a load test against an infinispan cluster.
> I tracked down the reason and found out, that the code in org.infinispan.util.concurrent.locks.containers.AbstractPerEntryLockContainer#releaseLock() causes these superfluous TimeoutExceptions.
> A small test case (which just prints out timeouts, too late timeouts and "paints" a lot of dots to the console - more dots/second on the console means better throughput ;-)
> In a short test I extended the class ReentrantPerEntryLockContainer and changed the implementation of releaseLock() as follows:
> {noformat}
> public void releaseLock(Object lockOwner, Object key) {
> ReentrantLock l = locks.get(key);
> if (l != null) {
> if (!l.isHeldByCurrentThread())
> throw new IllegalStateException("Lock for [" + key + "] not held by current thread " + Thread.currentThread());
> while (l.isHeldByCurrentThread())
> unlock(l, lockOwner);
> if (!l.hasQueuedThreads())
> locks.remove(key);
> }
> else
> throw new IllegalStateException("No lock for [" + key + ']');
> }
> {noformat}
> The main improvement is that locks are not removed from the concurrent map as long as other threads are waiting on that lock.
> If the lock is removed from the map while other threads are waiting for it, they may run into timeouts and force TimeoutExceptions to the client.
> The above methods "paints more dots per second" - means: it gives a better throughput for concurrent accesses to the same key.
> The re-implemented method should also fix some replication timeout exceptions.
> Please, please add this to 5.1.7, if possible.
--
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
12 years
[JBoss JIRA] (ISPN-1990) Preload sets the versions to null (repeatable read + write skew)
by Mircea Markus (JIRA)
[ https://issues.jboss.org/browse/ISPN-1990?page=com.atlassian.jira.plugin.... ]
Mircea Markus updated ISPN-1990:
--------------------------------
Fix Version/s: 5.3.0.Final
(was: 5.2.0.Final)
(was: 5.2.0.CR1)
> Preload sets the versions to null (repeatable read + write skew)
> ----------------------------------------------------------------
>
> Key: ISPN-1990
> URL: https://issues.jboss.org/browse/ISPN-1990
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 5.1.3.FINAL
> Environment: Java 6 (64bits)
> Infinispan 5.2.0-SNAPSHOT
> MacOS
> Reporter: Pedro Ruivo
> Assignee: Mircea Markus
> Labels: preload, skew, versioning, write
> Fix For: 5.3.0.Final
>
>
> I think I've spotted a issue when I use repeatable read with write skew check and I preload the cache.
>
> I've made a test case to reproduce the bug. It can be found here [1].
> The problem is that each keys preloaded is put in the container with version = null. When I try to commit a transaction, I get this exception:
>
> {code}
> java.lang.IllegalStateException: Entries cannot have null versions!
> at org.infinispan.container.entries.ClusteredRepeatableReadEntry.performWriteSkewCheck(ClusteredRepeatableReadEntry.java:44)
> at org.infinispan.transaction.WriteSkewHelper.performWriteSkewCheckAndReturnNewVersions(WriteSkewHelper.java:81)
> at org.infinispan.interceptors.locking.ClusteringDependentLogic$AllNodesLogic.createNewVersionsAndCheckForWriteSkews(ClusteringDependentLogic.java:133)
> at org.infinispan.interceptors.VersionedEntryWrappingInterceptor.visitPrepareCommand(VersionedEntryWrappingInterceptor.java:64)
> {code}
>
> I think that all info is in the test case, but if you need something let
> me know.
>
> Cheers,
> Pedro
> [1]
> https://github.com/pruivo/infinispan/blob/issue_1/core/src/test/java/org/...
--
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
12 years