Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-13227

AssertionError on getting cache size from the mbean on the inactive cluster

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.9
    • None
    • None

    Description

      The reproducer for CacheMetricsManageTest:

          /** @throws Exception If failed. */
          @Test
          public void testCacheSize() throws Exception {
              persistence = true;
      
              startGrid(0);
      
              CacheMetricsMXBean mxBean = mxBean(0, CACHE1, CacheClusterMetricsMXBeanImpl.class);
      
              long size = mxBean.getCacheSize();
      
              assertEquals(0, size);
          }
      

      AssertionError:

      java.lang.AssertionError: AffinityTopologyVersion [topVer=-1, minorTopVer=0]
      	at org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.cachedAffinity(GridAffinityAssignmentCache.java:794)
      	at org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.cachedAffinity(GridAffinityAssignmentCache.java:771)
      	at org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.primaryPartitions(GridAffinityAssignmentCache.java:697)
      	at org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl.cacheData(IgniteCacheOffheapManagerImpl.java:431)
      	at org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl.cacheEntriesCount(IgniteCacheOffheapManagerImpl.java:398)
      	at org.apache.ignite.internal.processors.cache.distributed.GridDistributedCacheAdapter.localSizeLong(GridDistributedCacheAdapter.java:284)
      	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.localSize(GridCacheAdapter.java:4151)
      	at org.apache.ignite.internal.processors.cache.CacheMetricsImpl.getEntriesStat(CacheMetricsImpl.java:1272)
      	at org.apache.ignite.internal.processors.cache.CacheMetricsSnapshotV2.<init>(CacheMetricsSnapshotV2.java:375)
      	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.localMetrics(GridCacheAdapter.java:3546)
      	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.clusterMetrics(GridCacheAdapter.java:3540)
      	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.clusterMetrics(GridCacheAdapter.java:3522)
      	at org.apache.ignite.internal.processors.cache.CacheClusterMetricsMXBeanImpl.getCacheSize(CacheClusterMetricsMXBeanImpl.java:119)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
      	at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
      	at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
      	at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
      	at com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:83)
      	at com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:206)
      	at javax.management.StandardMBean.getAttribute(StandardMBean.java:372)
      	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647)
      	at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678)
      	at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:273)
      	at com.sun.proxy.$Proxy30.getCacheSize(Unknown Source)
      	at org.apache.ignite.internal.processors.cache.CacheMetricsManageTest.testCacheSize(CacheMetricsManageTest.java:833)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.apache.ignite.testframework.junits.GridAbstractTest$7.run(GridAbstractTest.java:2232)
      	at java.lang.Thread.run(Thread.java:748)
      

      Attachments

        Issue Links

          Activity

            People

              NSAmelchev Nikita Amelchev
              NSAmelchev Nikita Amelchev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m