[infinispan-issues] [JBoss JIRA] (ISPN-4736) Add size() operation to Hot Rod
Galder Zamarreño (JIRA)
issues at jboss.org
Wed Sep 17 09:42:04 EDT 2014
Galder Zamarreño created ISPN-4736:
--------------------------------------
Summary: Add size() operation to Hot Rod
Key: ISPN-4736
URL: https://issues.jboss.org/browse/ISPN-4736
Project: Infinispan
Issue Type: Feature Request
Components: Remote Protocols
Reporter: Galder Zamarreño
Assignee: Galder Zamarreño
Fix For: 7.0.0.CR1, 7.0.0.Final
This jira is a spin-off of https://github.com/infinispan/infinispan/pull/2780, resulting from the feedback/comments provided by Will, Dan and Sanne.
Essentially, what ISPN-4470 tries to do is provide a RemoteCache.size() implementation. The first implementation simply computed the keySet() and got its size. This is clearly not optimal since you're bringing a load of keys to not use them at all.
The second solution used statistics of different nodes to calculate number of total keys in the cluster, and if statistics were disabled, fallback on keySet(). The problem here is that statistics don't take cache store contents into account but keySet() does, which would be confusing for the user. Having such size related statistics check persistent stores would affect performance of stats.
In the end, the best way to achieve this is by implementing a new size operation on Hot Rod that calculates the total number of keys without actually bringing keys back to clients. This new operation will be part of Hot Rod 2.0.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
More information about the infinispan-issues
mailing list