[
https://issues.jboss.org/browse/ISPN-9033?page=com.atlassian.jira.plugin....
]
William Burns commented on ISPN-9033:
-------------------------------------
I could have sworn I created a JIRA about invoking size on the CacheStore a long time ago,
but I can't seem to find it now.
Unfortunately invoking the size method on the CacheStore is not sufficient in the current
implementation of code. As Tristan mentioned passivation completely nullifies using the
size method, but can be worked around easily. The biggest problem is currently if you are
using a distributed cache with numOwners > 1 we cannot use the size method on the
cache, since we will be counting duplicates. We _could_ invoke size and then divide by
numOwners, but this still can be error prone as an element may or may not exist on both
backup and primary owners during a concurrent write. This seems like it should be fine
though, to me.
Also to note that with
https://issues.jboss.org/browse/ISPN-8905 will make being able to
invoke the size method a lot easier since we can properly invoke the size method on only
the given segments.
Web/CLI hangs if cache use cache store and has a lot of entries
---------------------------------------------------------------
Key: ISPN-9033
URL:
https://issues.jboss.org/browse/ISPN-9033
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 9.2.1.Final
Reporter: Sergey Chernolyas
My cache configuration has RocksDB's cache. Cache has a more then 1 000 000 entries.
And it do usage of Web interfce and CLI impossible.
As I have investigated, problem can be in class
org.infinispan.commands.read.SizeCommand.
{code:java}
public Integer perform(InvocationContext ctx) throws Throwable {
long size = cache.keySet().stream().count();
if (size > Integer.MAX_VALUE) {
return Integer.MAX_VALUE;
} else {
return (int) size;
}
}
{code}
I think, the code must ask CacheStore for sizing.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)