[
https://issues.apache.org/jira/browse/IGNITE-18998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kirill Gusakov updated IGNITE-18998:
------------------------------------
Description:
Accroding to the draft of replication IEP we must use the graceful transfer
mechanism, if PrimaryReplica is not a member of target topology, after
rebalance:
* The stopping PrimaryReplica sends a RevokeLease message to the
PlacementDriver.
* On receiving the message, the PlacementDriver chooses a new PrimaryReplica
successor and replies to old PrimaryReplicas
* On receiving the reply the old PrimaryReplica starts copying the lock table
and etc. to a successor. All new lock requests are routed to the successor
(which is not yet the PrimaryReplica!)
* Then a lock table is copied, so the successor has the same locks as the
current PrimaryReplica, it sends LeaseReplicated message to the
PlacementDriver. Lock requests are continued to be forwarded. Local lock table
can be destroyed.
* On receiving the message, the PlacementDriver sends RevokeLease to all txn
coordinators and waits for acks.
* On receiving this message coordinators start to use a new PrimaryReplica by
setting up new epoch.
* PlacementDriver continues to propagate liveness records for both old and new
PrimaryReplica during the transition.
* Then all coordinators acked, a tracker installs a new epoch with a new
leader and sends the corresponding message to a new PrimaryReplica.
* Old PrimaryReplica can be stopped
Note: if result IEP will have changes in the mechanism we must update the
description of current ticket
> Handle PrimaryReplica move during the rebalance correctly
> ---------------------------------------------------------
>
> Key: IGNITE-18998
> URL: https://issues.apache.org/jira/browse/IGNITE-18998
> Project: Ignite
> Issue Type: Task
> Reporter: Kirill Gusakov
> Priority: Major
> Labels: ignite-3
>
> Accroding to the draft of replication IEP we must use the graceful transfer
> mechanism, if PrimaryReplica is not a member of target topology, after
> rebalance:
> * The stopping PrimaryReplica sends a RevokeLease message to the
> PlacementDriver.
> * On receiving the message, the PlacementDriver chooses a new PrimaryReplica
> successor and replies to old PrimaryReplicas
> * On receiving the reply the old PrimaryReplica starts copying the lock
> table and etc. to a successor. All new lock requests are routed to the
> successor (which is not yet the PrimaryReplica!)
> * Then a lock table is copied, so the successor has the same locks as the
> current PrimaryReplica, it sends LeaseReplicated message to the
> PlacementDriver. Lock requests are continued to be forwarded. Local lock
> table can be destroyed.
> * On receiving the message, the PlacementDriver sends RevokeLease to all txn
> coordinators and waits for acks.
> * On receiving this message coordinators start to use a new PrimaryReplica
> by setting up new epoch.
> * PlacementDriver continues to propagate liveness records for both old and
> new PrimaryReplica during the transition.
> * Then all coordinators acked, a tracker installs a new epoch with a new
> leader and sends the corresponding message to a new PrimaryReplica.
> * Old PrimaryReplica can be stopped
> Note: if result IEP will have changes in the mechanism we must update the
> description of current ticket
--
This message was sent by Atlassian Jira
(v8.20.10#820010)