Why there is a difference between the API call size() and the JMX clustered stats numberOfEntries when counting the entries within the JDG cache

Solution Verified - Updated -

Issue

  • The Cache API size() shows the correct number of items within the cache, but the JMX attribute jboss.datagrid-infinispan.distSyncCache.ContainerName.ClusterCacheStats.numberOfEntries shows a different number
  • It is expected that the current cache size can monitored by using JMX attribute ClusterCacheStats.numberOfEntries but it does not show the correct number of entries
  • If passivation is enabled the cache statistic provided by JMX shows incorrect numbers

Environment

  • Red Hat JBoss Data Grid (RDG; JDG)
    • 7.1
    • 7.0
    • 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content