You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by vkulichenko <va...@gmail.com> on 2018/10/01 21:46:21 UTC

Re: Task failover in ignite

Prasad,

When a primary node for a partition dies, former backup node for this
partition becomes new primary. Therefore there is no need to wait for
rebalancing in this case, data is already there. By default job will be
automatically remapped to that node, but with 'withNoFailover()' you'll have
to retry manually.

In addition, affinityRun/Call acquires a partition lock for a duration of
computation to make sure data is not moved until it's completed. I.e. if
there is a new node that becomes a new owner for this partition, data for
this partition will not be evicted from previous primary until all
collocated computations are done.

-Val



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Task failover in ignite

Posted by vkulichenko <va...@gmail.com>.
Prasad,


prasadbhalerao1983 wrote
> Are you saying that when a primary node dies the former backup node
> becomes
> new primary for ALL backup partitions present on it and only primary
> partitions are moved in rebalancing process?

Not for all partitions, but only for those for which primary copy existed on
the recently failed node. For example, you have nodes A, B and C. Partition
#1 has primary copy on A and backup on B. Partition #2 has primary copy on C
and backup on B. If A dies, B becomes primary node for partition #1, and
then rebalancing creates a new backup for it on C. However, nothing changes
for partition #2, because A didn't own any of its copies.

prasadbhalerao1983 wrote
> Partition to node mapping is defined by affinity function which uses
> Rendezvous Hashing. How does it make sure that back up partitions on a
> node
> becomes primary partitions on same node?

That's how the function is implemented. If you're interested in more
details, I would suggest you to go through the code of
RendezvousAffinityFunction.

-Val



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Task failover in ignite

Posted by Prasad Bhalerao <pr...@gmail.com>.
Hi Val,

Thank you for the explanation.

Are you saying that when a primary node dies the former backup node becomes
new primary for ALL backup partitions present on it and only primary
partitions are moved in rebalancing process?

Partition to node mapping is defined by affinity function which uses
Rendezvous Hashing. How does it make sure that back up partitions on a node
becomes primary partitions on same node?



Regards,
Prasad


On Tue, Oct 2, 2018, 3:16 AM vkulichenko <va...@gmail.com>
wrote:

> Prasad,
>
> When a primary node for a partition dies, former backup node for this
> partition becomes new primary. Therefore there is no need to wait for
> rebalancing in this case, data is already there. By default job will be
> automatically remapped to that node, but with 'withNoFailover()' you'll
> have
> to retry manually.
>
> In addition, affinityRun/Call acquires a partition lock for a duration of
> computation to make sure data is not moved until it's completed. I.e. if
> there is a new node that becomes a new owner for this partition, data for
> this partition will not be evicted from previous primary until all
> collocated computations are done.
>
> -Val
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>