Primary Entry Count are not correct in cache

classic Classic list List threaded Threaded
2 messages Options
akash shinde akash shinde
Reply | Threaded
Open this post in threaded view
|

Primary Entry Count are not correct in cache

Hi I have created a cache with following configuration. I started four nodes,each node on different machines.
I have loaded this cache with loader.
Issue: I am not performing any operation on this cache but I am able to see the primary key count not constant. Its keep on changing after some time. I am taking this key count from gridgain web console. Ideally my loader query result count should match with primary entries in cache.
Ignite version 2.6.0.
Could someone  suggest why this is happening?

CacheConfiguration subscriptionCacheCfg = new CacheConfiguration<>(CacheName.SUBSCRIPTION_CACHE.name());
subscriptionCacheCfg.setAtomicityMode(CacheAtomicityMode.
TRANSACTIONAL);
subscriptionCacheCfg.setWriteThrough(
false);
subscriptionCacheCfg.setReadThrough(
true);
subscriptionCacheCfg.setRebalanceMode(CacheRebalanceMode.
ASYNC);
subscriptionCacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.
FULL_SYNC);
subscriptionCacheCfg.setBackups(
2);

Factory<SubscriptionDataLoader> storeFactory = FactoryBuilder.factoryOf(SubscriptionDataLoader.
class);
subscriptionCacheCfg.setCacheStoreFactory(storeFactory);
subscriptionCacheCfg.setIndexedTypes(DefaultDataKey.
class, SubscriptionData.class);
subscriptionCacheCfg.setSqlIndexMaxInlineSize(
47);
RendezvousAffinityFunction affinityFunction =
new RendezvousAffinityFunction();
affinityFunction.setExcludeNeighbors(
true);
subscriptionCacheCfg.setAffinity(affinityFunction);
subscriptionCacheCfg.setStatisticsEnabled(
true);
subscriptionCacheCfg.setPartitionLossPolicy(PartitionLossPolicy.
READ_WRITE_SAFE);

Thanks,
Akash
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: Primary Entry Count are not correct in cache

Hello!

Unfortunately there is too few information. How does your loader work? How large is the difference between expected and actual? How does it change with time? Have you tried other means of checking cache size?

Regards,
--
Ilya Kasnacheev


пт, 29 нояб. 2019 г. в 21:35, Akash Shinde <[hidden email]>:
Hi I have created a cache with following configuration. I started four nodes,each node on different machines.
I have loaded this cache with loader.
Issue: I am not performing any operation on this cache but I am able to see the primary key count not constant. Its keep on changing after some time. I am taking this key count from gridgain web console. Ideally my loader query result count should match with primary entries in cache.
Ignite version 2.6.0.
Could someone  suggest why this is happening?

CacheConfiguration subscriptionCacheCfg = new CacheConfiguration<>(CacheName.SUBSCRIPTION_CACHE.name());
subscriptionCacheCfg.setAtomicityMode(CacheAtomicityMode.
TRANSACTIONAL);
subscriptionCacheCfg.setWriteThrough(
false);
subscriptionCacheCfg.setReadThrough(
true);
subscriptionCacheCfg.setRebalanceMode(CacheRebalanceMode.
ASYNC);
subscriptionCacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.
FULL_SYNC);
subscriptionCacheCfg.setBackups(
2);

Factory<SubscriptionDataLoader> storeFactory = FactoryBuilder.factoryOf(SubscriptionDataLoader.
class);
subscriptionCacheCfg.setCacheStoreFactory(storeFactory);
subscriptionCacheCfg.setIndexedTypes(DefaultDataKey.
class, SubscriptionData.class);
subscriptionCacheCfg.setSqlIndexMaxInlineSize(
47);
RendezvousAffinityFunction affinityFunction =
new RendezvousAffinityFunction();
affinityFunction.setExcludeNeighbors(
true);
subscriptionCacheCfg.setAffinity(affinityFunction);
subscriptionCacheCfg.setStatisticsEnabled(
true);
subscriptionCacheCfg.setPartitionLossPolicy(PartitionLossPolicy.
READ_WRITE_SAFE);

Thanks,
Akash