It is unclear what the intended semantics of using
IgniteCompute.affinityRun() when a subset of the grid was selected. From
reading the code, my current guess is IgniteCompute.affinityRun() will run
on the primary, regardless of whether only a subset of the grid was
specified.
In my case I have two ClusterGroups, each of which is a set of nodes where
each partition of a cache with 1 backup is represented exactly once ( used
a customAffinityBackup function to accomplish this). The primary
partitions are spread over all nodes, but I can lose all nodes an 1 of the
cluster groups without losing data (in theory).
If I use ignite.compute(grp).broadcast(), the closure would run on 1/2
the nodes but be able to . If the closure had bugs that triggered a node
failure, the cluster should stay up (assuming there is a witness).
Similarly. I would like ignite.compute(grp).affinityRunAsync() on a cache
created with readFromBackup to pay attention to the constraint that I
placed.
GridClosureProcessor.affinityRun() calls
GridAffinityProcessor.mapPartitionToNode()
which returns only the primary node for the partition. The node subset is
stored in the thread context under TC_SUBGRID
Eventually it seems we get to
// Nodes are ignored by affinity tasks.
Disclaimer
The information contained in this communication from the sender is
confidential. It is intended solely for use by the recipient and others
authorized to receive it. If you are not the recipient, you are hereby notified
that any disclosure, copying, distribution or taking action in relation of the
contents of this information is strictly prohibited and may be unlawful.
This email has been scanned for viruses and malware, and may have been
automatically archived by Mimecast Ltd, an innovator in Software as a Service
(SaaS) for business. Providing a safer and more useful place for your human
generated data. Specializing in; Security, archiving and compliance. To find
out more visit the Mimecast website.