[
https://issues.apache.org/jira/browse/IGNITE-12188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aleksey Plekhanov updated IGNITE-12188:
---------------------------------------
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:
{code:java}
@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);
}
{code}
was:
Initial partitions counter is set to a total number of partitions for cache
group but decremented each time partition processed for each cache.
Reproducer:
{code:java}
@Test
public void testIndexRebuildMetrics() throws Exception {
IgniteConfiguration cfg = 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)
);
IgniteEx ignite = startGrid(cfg);
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);
}
{code}
> Metric CacheGroupMetrics.IndexBuildCountPartitionsLeft doesn't work correctly
> if there is more then one cache in cache group
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: IGNITE-12188
> URL: https://issues.apache.org/jira/browse/IGNITE-12188
> Project: Ignite
> Issue Type: Bug
> Affects Versions: 2.8
> Reporter: Aleksey Plekhanov
> Priority: Major
>
> Initial partitions counter is set to a total number of partitions for cache
> group but decremented each time partition processed for each cache.
> Reproducer:
> {code:java}
> @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);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)