ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wetnose <mot...@mail.ru>
Subject Re: Reassign partitions
Date Thu, 08 Sep 2016 00:36:49 GMT

Look at the following list of steps

* Create a cache "X" with 3 partitions and 1 backup, configure a local store
* Start Node1 and Node2, the affinity function assigns nodes as follows
    part.0: Node1 (prim) Node2 (back)
    part.1: Node2 (prim) Node1 (back)
    part.2: Node1 (prim) Node2 (back)
  so, Node1 is primary for partitions 0 and 2
* Put sveral records to the cache: all of them are written to the local
store on both nodes (because any node is primary or backaup for each
* Stop all the nodes
* Start them again: the memory on both nodes is empty, nothing is preloaded
(record are not read from the local stores yet)
* Start Node3 and let AffinityFunction mark Node3 as primary for partition 2
(leave the backup on Node2)
* Iginte (if lateAffAssignment=true) keeps Node1 as primary when
rebalancing: it moves entries from the memory of Node1 to the memory (and to
the local store) of Node3
    part.0: Node1 (prim) Node2 (back)
    part.1: Node2 (prim) Node1 (back)
    part.2: Node1 (prim) Node3 (back) Node2 (back)
* Since all records from memory (!) are moved, Ignite stops the balancing
and restores the "ideal assignment": it replaces Node1 with Node3
    part.0: Node1 (prim) Node2 (back)
    part.1: Node2 (prim) Node1 (back)
    part.2: Node3 (prim) Node2 (back)
* Now Node3 contains records that were moved from the memory of Node1, but
other records in the Node1's store (for part.2) where ignored and lost.

Where I made a mistake?

What I want to do is to delay the ideal assignment restoring until the local
store of the "primary node candidate" is completely synchronized with the
local store of the current primary node (somehow).

Is there a way to avoid the data loss when changing the cluster topology
(with local stores)?

View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Reassign-partitions-tp7461p7597.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message