[ https://issues.apache.org/jira/browse/IGNITE-23885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kirill Sizov updated IGNITE-23885: ----------------------------------- Description: h3. Motivation For the purposes of phase 2 of [IEP-131|https://cwiki.apache.org/confluence/display/IGNITE/IEP-131%3A+Partition+Majority+Unavailability+Handling], we have introduced (https://issues.apache.org/jira/browse/IGNITE-23870) the method for receiving a chain of a assignments. This chain will be used in the restart node logic and based on this chain node will decide, if raft group should or should not start on the current node. In case when on restart node receives only one element in this chain, node must reuse the current logic for the partition to start, based on the info about stable and pending keys. h3. Implementation notes In start table flow, when {{isRecovery}} flag is true, we must add check for the size of assignments chain, and if this size is equals to 1, the common logic for the partition start must be reused. {code:java} if (assignments.chain().size() == 1) { start partition on node if node in union(stable + pending) (old logic) } else { todo to use logic from "https://issues.apache.org/jira/browse/IGNITE-23874" start partition on node if node in union(stable + pending) (old logic) // fine to have the same branch until the skeletal implementaiton is done } {code} There are two places in TableManager where this check can be added: {{startLocalPartitionsAndClients}} and {{handleChangePendingAssignmentEvent}}. The former comes right before the latter, so please make sure there is no double start of the partition if exactly the same condition is checked in both these places. h3. Definition of done * When on restart node receives only one element in the assignments chain, node must reuse the current logic for the partition to start, based on the info about stable and pending keys. was: h3. Motivation For the purposes of phase 2 of [IEP-131|https://cwiki.apache.org/confluence/display/IGNITE/IEP-131%3A+Partition+Majority+Unavailability+Handling], we have introduced (https://issues.apache.org/jira/browse/IGNITE-23870) the method for receiving a chain of a assignments. This chain will be used in the restart node logic and based on this chain node will decide, if raft group should or should not start on the current node. In case when on restart node receives only one element in this chain, node must reuse the current logic for the partition to start, based on the info about stable and pending keys. h3. Implementation notes In start table flow, when {{isRecovery}} flag is true, we must add check for the size of assignments chain, and if this size is equals to 1, the common logic for the partition start must be reused. {code:java} if (assignments.chain().size() == 1) { start partition on node if node in union(stable + pending) (old logic) } else { todo to use logic from "https://issues.apache.org/jira/browse/IGNITE-23874" start partition on node if node in union(stable + pending) (old logic) // until the skeletal implementaiton is done } {code} There are two places in TableManager where this check can be added: {{startLocalPartitionsAndClients}} and {{handleChangePendingAssignmentEvent}}. The former comes right before the latter, so please make sure there is no double start of the partition if exactly the same condition is checked in both these places. h3. Definition of done * When on restart node receives only one element in the assignments chain, node must reuse the current logic for the partition to start, based on the info about stable and pending keys. > Start partition in a common manner (stable + pending) in case of a single > element in chain > ------------------------------------------------------------------------------------------ > > Key: IGNITE-23885 > URL: https://issues.apache.org/jira/browse/IGNITE-23885 > Project: Ignite > Issue Type: New Feature > Reporter: Alexander Lapin > Assignee: Kirill Sizov > Priority: Major > Labels: ignite-3 > > h3. Motivation > For the purposes of phase 2 of > [IEP-131|https://cwiki.apache.org/confluence/display/IGNITE/IEP-131%3A+Partition+Majority+Unavailability+Handling], > > we have introduced (https://issues.apache.org/jira/browse/IGNITE-23870) the > method for receiving a chain of a assignments. This chain will be used in the > restart node logic and based on this chain node will decide, if raft group > should or should not start on the current node. > In case when on restart node receives only one element in this chain, node > must reuse the current logic for the partition to start, based on the info > about stable and pending keys. > h3. Implementation notes > In start table flow, when {{isRecovery}} flag is true, we must add check for > the size of assignments chain, and if this size is equals to 1, the common > logic for the partition start must be reused. > {code:java} > if (assignments.chain().size() == 1) { > start partition on node if node in union(stable + pending) (old logic) > } else { > todo to use logic from > "https://issues.apache.org/jira/browse/IGNITE-23874" > start partition on node if node in union(stable + pending) (old logic) // > fine to have the same branch until the skeletal implementaiton is done > } > {code} > There are two places in TableManager where this check can be added: > {{startLocalPartitionsAndClients}} and > {{handleChangePendingAssignmentEvent}}. The former comes right before the > latter, so please make sure there is no double start of the partition if > exactly the same condition is checked in both these places. > h3. Definition of done > * When on restart node receives only one element in the assignments chain, > node must reuse the current logic for the partition to start, based on the > info about stable and pending keys. -- This message was sent by Atlassian Jira (v8.20.10#820010)