ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilya Kasnacheev <ilya.kasnach...@gmail.com>
Subject Re: Ignite partition redistribution when topology is changed.
Date Mon, 29 Oct 2018 09:34:09 GMT
Hello!

As far as I understand, assignPartitions() will be called as many times as
needed in order to always have the latest one.

It is assumed to be stateless anyway.

Considerations are the following, as per javadoc:

* Gets affinity nodes for a partition. In case of replicated cache, all returned
* nodes are updated in the same manner. In case of partitioned cache,
the returned
* list should contain only the primary and back up nodes with primary node being
* always first.
* <p>
* Note that partitioned affinity must obey the following contract:
given that node
* <code>N</code> is primary for some key <code>K</code>, if any other
node(s) leave
* grid and no node joins grid, node <code>N</code> will remain primary
for key <code>K</code>.

Regards,
-- 
Ilya Kasnacheev


пн, 29 окт. 2018 г. в 11:41, kotamrajuyashasvi <kotamrajuyashasvi@gmail.com
>:

> Hi
>
> I'm working on a custom affinity function.
> According to the documentation :
>
> https://apacheignite.readme.io/docs/affinity-collocation#section-affinity-function
> assignPartitions(...) method is called whenever cluster topology changes.
> So
> redistribution
> of partitions happens after this method is called. What would happen when
> cluster topology
> changes while the partition redistribution is still in progress. Does
> Ignite
> internally handle this
> case or should we handle it in our custom affinity function code.
>
> Also what are the important scenarios to consider regarding primary and
> backup partition redistribution
> while writing our own affinity function.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Mime
View raw message