Hello!

I recommend moving this discussion to developer list. Still,

> I would like ignite.compute(grp).affinityRunAsync() on a cache created
with readFromBackup to pay attention to the constraint that I placed.

affinityRun is often used to write to cache as well!

I think this is too narrow as a case. You can write your own
affinityRunIncludingBackup() method if you really need it.

Regards,

-- 
Ilya Kasnacheev


пт, 31 авг. 2018 г. в 1:15, Dave Harvey <[email protected]>:

>
> 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 Click Here
> <http://www.mimecast.com/products/>.
>

Reply via email to