[ 
https://issues.apache.org/jira/browse/IGNITE-21805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17849819#comment-17849819
 ] 

Mikhail Efremov edited comment on IGNITE-21805 at 5/27/24 8:07 PM:
-------------------------------------------------------------------

*Done work*
 # {{RaftManager}} is moved into {{ReplicaManager}} completely.
 # Almost all calls from {{RaftManager}} are made as internal 
{{{}ReplicaManager{}}}'s calls.
 # {{ReplicaManager#replica()}} method is created and it returns a future 
replica by given replication group ID; the method allows to get access to 
raft-clients outside replication layer, but through it.
 # The follow RAFT-related entities are moved into {{{}ReplicaManager{}}}: 
{{{}RaftGroupOptions{}}}, {{RaftGroupEventsListener}} 
({{{}RebalanceRaftGroupEventsListener{}}}), {{{}PartitionMover{}}}, 
{{{}TopologyAwareRaftGroupServiceFactory{}}}, {{{}LogStorageFactoryCreator{}}}.
 # The creation place of raft-client in {{TableManager}} through 
{{ReplicaManager#startRaftClient}} is localized now and will be removed in  
IGNITE-22315

*Related next tickets*
 #  IGNITE-22315 is about making code to a state where if a node is related in 
assignments, then and only then there will be created only one raft-node, only 
one raft-client and only one replica. {{ReplicaManager#startRaftClient}} will 
be removed as it's single call.
 # IGNITE-22218 is about {{TableRaftService}} removing from the code and it's 
calls for raft-clients will be replaced with a chains like 
{{{}replicaMgr.replica(replicaGrpId).thenCompose(raftClient -> ...){}}}.
 # IGNITE-22292 is about {{ReplicaManager#getLogSyncer}} removal.

 


was (Author: JIRAUSER303791):
*Done work*
 # {{RaftManager}} is moved into {{ReplicaManager}} completely.
 # Almost all calls from {{RaftManager}} are made as internal 
{{{}ReplicaManager{}}}'s calls.
 # {{ReplicaManager#replica()}} method is created and it returns a future 
replica by given replication group ID; the method allows to get access to 
raft-clients outside replication layer, but through it.
 # The follow RAFT-related entities are moved into {{{}ReplicaManager{}}}: 
{{{}RaftGroupOptions{}}}, {{RaftGroupEventsListener}} 
({{{}RebalanceRaftGroupEventsListener{}}}), {{{}PartitionMover{}}}, 
{{{}TopologyAwareRaftGroupServiceFactory{}}}, {{{}LogStorageFactoryCreator{}}}.
 # The creation place of raft-client in {{TableManager}} through 
{{ReplicaManager#startRaftClient}} is localized now and will be removed in  
IGNITE-22315

*Related next tickets*
 #  IGNITE-22315 is about making code to a state where if a node is related in 
assignments, then and only then there will be created only one raft-node, only 
one raft-client and only one replica. {{ReplicaManager#startRaftClient}} will 
be removed as it's single call.
 # IGNITE-22218 is about {{TableRaftService}} removing from the code and it's 
calls for raft-clients will be replaced with a chains like 
{{{}replicaMgr.replica(replicaGrpId).thenCompose(raftClient -> ...){}}}.

 

> Refactor TableManager and move all RAFT related pieces to Replica
> -----------------------------------------------------------------
>
>                 Key: IGNITE-21805
>                 URL: https://issues.apache.org/jira/browse/IGNITE-21805
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Kirill Gusakov
>            Assignee: Mikhail Efremov
>            Priority: Major
>              Labels: ignite-3
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> *Motivation*
> At the moment we have some places inside the TableManager, which:
>  * Use RaftManager to start/stop RAFT nodes 
> (handleChangePendingAssignmentEvent/handleChangeStableAssignmentEvent)
>  * Use RaftGroupService through 
> table.internalTable().tableRaftService().partitionRaftGroupService calls
> This fact prevents us on the track of zone-based collocation. The further 
> collocation steps will be easier, if we will move the whole RAFT connected 
> operation to the Replica class. Moreover, it should be there semantically
> *Definition of done*
>  * All code inside the handleChangePendingAssignmentEvent connected with the 
> start of raft groups (PartitionListener/RebalanceRaftGroupEventsListener) and 
> raft clients must be moved to the start of the Replica itself
>  * The same about handleChangeStableAssignmentEvent - the stop of Replica 
> must stop appropriate raft node
>  * All calls for 
> table.internalTable().tableRaftService().partitionRaftGroupService must be 
> replaced by the replicaMgr.replica(replicaGrpdId).raftClient()
> *Implementation notes*
>  * The new temporary methods must be implemented and remove after IGNITE-22036
>  ** ReplicaManager.replica(ReplicationGroupId replicaGrpId) - which returns 
> the appropriate Replica by group id
>  ** Replica.raftClient() - which return replica's RaftGroupService (raft 
> client)
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to