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

Metric CacheGroupMetrics.IndexBuildCountPartitionsLeft doesn't work correctly if there is more then one cache in cache group

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8
    • Fix Version/s: 2.8
    • Component/s: None
    • Labels:

      Description

      Initial partitions counter is set to a total number of partitions for cache group but decremented each time partition processed for each cache.

      Reproducer:

          @Test
          public void testIndexRebuildMetrics() throws Exception {
              IgniteEx ignite = startGrid(new IgniteConfiguration()
                  .setConsistentId("ignite")
                  .setDataStorageConfiguration(new DataStorageConfiguration()
                      .setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true)))
                  .setCacheConfiguration(
                      new CacheConfiguration<Integer, Integer>("c1").setGroupName("grp").setIndexedTypes(Integer.class, Integer.class),
                      new CacheConfiguration<Integer, Integer>("c2").setGroupName("grp").setIndexedTypes(Integer.class, Integer.class)
                  ));
      
              ignite.cluster().active(true);
      
              for (int i = 0; i < 10_000; i++)
                  ignite.cache("c1").put(i, i);
      
              ignite.cluster().active(false);
      
              File dir = U.resolveWorkDirectory(U.defaultWorkDirectory(), DFLT_STORE_DIR, false);
      
              U.delete(new File(dir, "ignite/cacheGroup-grp/index.bin"));
      
              ignite.cluster().active(true);
      
              doSleep(1_000L);
      
              assertTrue(ignite.context().cache().cache("c1").context().group().metrics().getIndexBuildCountPartitionsLeft() >= 0);
          }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                NSAmelchev Amelchev Nikita
                Reporter:
                alex_pl Aleksey Plekhanov
              • 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 - 0.5h
                  0.5h