[infinispan-issues] [JBoss JIRA] (ISPN-4470) cache.keySet().size() returns different value than cache.size() for HotRod client
Galder Zamarreño (JIRA)
issues at jboss.org
Wed Jul 2 12:14:25 EDT 2014
[ https://issues.jboss.org/browse/ISPN-4470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981530#comment-12981530 ]
Galder Zamarreño commented on ISPN-4470:
----------------------------------------
RemoteCache.keySet() javadoc:
{quote}
* Returns all keys in the remote server. It'll invoke a command over the network each time this method is called.
* If the remote cache is a distributed cache, it will retrieve all of the keys from all nodes in the cluster.
* Please use with care for cache with large data set.
{quote}
It's clear that keySet() can retrieve keys cluster-wide.
size() should behave in a similar way, since it should not vary depending on the server that it hits. Its javadoc needs adjusting too.
> cache.keySet().size() returns different value than cache.size() for HotRod client
> ---------------------------------------------------------------------------------
>
> Key: ISPN-4470
> URL: https://issues.jboss.org/browse/ISPN-4470
> Project: Infinispan
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.0.2.Final, 7.0.0.Alpha4
> Reporter: Martin Gencur
> Assignee: Galder Zamarreño
> Priority: Critical
> Fix For: 7.0.0.Beta1, 7.0.0.Final
>
>
> cache.keySet().size() returns the number of all keys in the cluster (even a distributed one) while cache.size() returns just local cache size (this might be different for a distributed cache)
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the infinispan-issues
mailing list