Is it possible to loose data or different data is present on different key in Ignite Cache?


Is it possible to loose data or different data is present on different key in Ignite Cache?



I am using Ignite cluster of 3 Ignite nodes. In which, Cache on which I am operating has CacheAtomicityMode as Atomic and CacheMode as PARTITIONED.
Is it possible to loose data or different data is present on different key?



Note: Data loading happened on server side. It is possible that same data with multiple objects will load on all server at same time



Cache Config:


CacheConfiguration<String, JsonObject> cacheConfig = new CacheConfiguration<>();
cacheConfig.setName("CACHE");
cacheConfig.setCacheMode(CacheMode.PARTITIONED);
cacheConfig.setAtomicityMode(CacheAtomicityMode.ATOMIC );
cacheConfig.setReadThrough(true);
cacheConfig.setBackups(2);
cacheConfig.setCacheStoreFactory(FactoryBuilder.factoryOf(ObjectLoader.class));
cacheConfig.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_ASYNC);
IgniteCache<String, JsonObject> cache = ignite.getOrCreateCache(cacheConfig);




1 Answer
1



If two nodes go down before it's finished copying the data to both backups, you might lose some data. You can change that by using the FULL_SYNC Write Synchronisation Mode.



(Also worth noting: if you want to have all your data on all nodes, you can use the REPLICATED Cache Mode.)





Yes, I already changed cache mode to REPLICATED but before when I was using PARTITIONED mode the duplicated values were present on different key. means value of A present on key A and B both.
– Rhishi
Jul 9 at 4:55






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

PHP contact form sending but not receiving emails

PHP parse/syntax errors; and how to solve them?

iOS Top Alignment constraint based on screen (superview) height