Hi Arthi,

Can you elaborate more on what you want to achieve by collocation based on
two fields?

If you have a class A, which is used as a cache key, has a field aKey, then
setting this field as an affinity key tells ignite that an instance of
class A should always be stored on the same node (more specifically, in the
same partition) as the value of aKey field would have been stored.

Now, if you have two fields you want to use as an affinity field, there are
two possible scenarios:
 * These fields always reside in the same partition. Then there is no need
to use both fields and it is sufficient to specify only one field as an
affinity key field.
 * These fields may end up in different partitions, thus they may end up on
different nodes in a topology. In this case Ignite would not be able to
determine which node to use to store the original key and thus such a
configuration is incorrect.

Reply via email to