[JBoss JIRA] (ISPN-9777) Default AdvancedCacheLoader#publishEntries can hang with more than 2048 entries
by William Burns (Jira)
[ https://issues.jboss.org/browse/ISPN-9777?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-9777:
--------------------------------
Status: Open (was: New)
> Default AdvancedCacheLoader#publishEntries can hang with more than 2048 entries
> -------------------------------------------------------------------------------
>
> Key: ISPN-9777
> URL: https://issues.jboss.org/browse/ISPN-9777
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 9.3.0.Final
> Reporter: William Burns
> Assignee: William Burns
> Priority: Major
> Fix For: 10.0.0.Alpha2
>
>
> The default method for AdvancedCacheLoader#publishEntries relies on the invocation of the process method. This uses the PersistenceManagerCloseableSupplier to handle this. Unfortunately it uses a WithinThreadExecutor, which actually can cause the process method to deadlock with a single thread as it can fill up the queue of 2048 elements.
> We should instead use a single threaded executor which would allow the loading of elements and retrieval in parallel on 2 different threads.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years
[JBoss JIRA] (ISPN-9777) Default AdvancedCacheLoader#publishEntries can hang with more than 2048 entries
by William Burns (Jira)
[ https://issues.jboss.org/browse/ISPN-9777?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-9777:
--------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/6479
> Default AdvancedCacheLoader#publishEntries can hang with more than 2048 entries
> -------------------------------------------------------------------------------
>
> Key: ISPN-9777
> URL: https://issues.jboss.org/browse/ISPN-9777
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 9.3.0.Final
> Reporter: William Burns
> Assignee: William Burns
> Priority: Major
> Fix For: 10.0.0.Alpha2
>
>
> The default method for AdvancedCacheLoader#publishEntries relies on the invocation of the process method. This uses the PersistenceManagerCloseableSupplier to handle this. Unfortunately it uses a WithinThreadExecutor, which actually can cause the process method to deadlock with a single thread as it can fill up the queue of 2048 elements.
> We should instead use a single threaded executor which would allow the loading of elements and retrieval in parallel on 2 different threads.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years
[JBoss JIRA] (ISPN-9777) Default AdvancedCacheLoader#publishEntries can hang with more than 2048 entries
by William Burns (Jira)
[ https://issues.jboss.org/browse/ISPN-9777?page=com.atlassian.jira.plugin.... ]
William Burns commented on ISPN-9777:
-------------------------------------
Note this issue can be worked around by overriding the publishEntries method to do the same as the PR or even better update an existing AdvancedCacheLoader to use processEntries as it should.
> Default AdvancedCacheLoader#publishEntries can hang with more than 2048 entries
> -------------------------------------------------------------------------------
>
> Key: ISPN-9777
> URL: https://issues.jboss.org/browse/ISPN-9777
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 9.3.0.Final
> Reporter: William Burns
> Assignee: William Burns
> Priority: Major
> Fix For: 10.0.0.Alpha2
>
>
> The default method for AdvancedCacheLoader#publishEntries relies on the invocation of the process method. This uses the PersistenceManagerCloseableSupplier to handle this. Unfortunately it uses a WithinThreadExecutor, which actually can cause the process method to deadlock with a single thread as it can fill up the queue of 2048 elements.
> We should instead use a single threaded executor which would allow the loading of elements and retrieval in parallel on 2 different threads.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years
[JBoss JIRA] (ISPN-9781) ProtoBuf CacheStore
by Tristan Tarrant (Jira)
Tristan Tarrant created ISPN-9781:
-------------------------------------
Summary: ProtoBuf CacheStore
Key: ISPN-9781
URL: https://issues.jboss.org/browse/ISPN-9781
Project: Infinispan
Issue Type: Enhancement
Components: Loaders and Stores
Reporter: Tristan Tarrant
Implement a cachestore that can map protobuf entities to a relational model. This cache store should use Hibernate ORM.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years
[JBoss JIRA] (ISPN-9780) compute* implementations for Hot Rod clients
by Tristan Tarrant (Jira)
Tristan Tarrant created ISPN-9780:
-------------------------------------
Summary: compute* implementations for Hot Rod clients
Key: ISPN-9780
URL: https://issues.jboss.org/browse/ISPN-9780
Project: Infinispan
Issue Type: Enhancement
Components: Hot Rod
Reporter: Tristan Tarrant
Fix For: 10.0.0.Final
for (; ; ) {
VersionedValue<V> versioned = cache.getWithMetadata(key);
if (versioned != null) {
return versioned.getValue();
}
V newValue = f(key);
if (cache.putIfAbsent(key, newValue)) {
return newValue;
}
}
(idea
computeIfAbsent(userId, Function<K, V> f)
getOrLock
If locked > v = f() then putAndUnlock(userId, v)
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years