I realized that if a have an global AtomicConfiguration like the following:

final AtomicConfiguration atomicConfiguration = new AtomicConfiguration();
atomicConfiguration.setCacheMode(CacheMode.REPLICATED);
igniteCfg.setAtomicConfiguration(atomicConfiguration);

and I create a set with the default configuration, automatically the default 
config is partitioned, and the error appears.

Then, it seems to be either I need to configure the CollectionConfiguration 
exactly the same as the AtomicConfiguration, or place the Collection in a 
different group altogether...

Thanks,

Juan

From: Juan Barani
Sent: Tuesday, August 1, 2017 2:22 PM
To: user@ignite.apache.org
Subject: Cache Groups and PARTITIONED/REPLICATED

Hi!

While trying the execute the very first snippet that creates a set in the 
documentation:

https://apacheignite.readme.io/docs/queue-and-set#overview


Ignite ignite = Ignition.ignite();



IgniteSet<String> set = ignite.set(

    "setName", // Set name.

    null       // Collection configuration.

);

the returned set is always null. As soon as an empty configuration is passed, 
the set seems to work again. Is this the intended behavior? I guess either the 
code or the documentation is outdated, can it be?

Also, since updating from 2.0.0 to 2.1.0 we are getting the following error 
message, apparently when sets are configured to be replicated and internal 
caches (for atomics) are configured otherwise:

class org.apache.ignite.IgniteException: Cache mode mismatch for caches related 
to the same group [groupName=default-ds-group, 
existingCache=ignite-sys-atomic-cache@default-ds-group, 
existingCacheMode=PARTITIONED, 
startingCache=datastructures_ATOMIC_REPLICATED_0@default-ds-group, 
startingCacheMode=REPLICATED]

Should from 2.1.0 onwards caches/sets with different requirements be stored in 
different cache groups?

Thanks!

Juan





Reply via email to