Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-4736

Add size() operation to Hot Rod

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              rh-ee-galder Galder ZamarreƱo
              rh-ee-galder Galder ZamarreƱo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: