[
https://issues.apache.org/jira/browse/IGNITE-18155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17636511#comment-17636511
]
Roman Puchkovskiy commented on IGNITE-18155:
--------------------------------------------
The patch looks good to me, thanks!
> Update changePeersAsync method to support learners configuration
> ----------------------------------------------------------------
>
> Key: IGNITE-18155
> URL: https://issues.apache.org/jira/browse/IGNITE-18155
> Project: Ignite
> Issue Type: Task
> Reporter: Aleksandr Polovtcev
> Assignee: Aleksandr Polovtcev
> Priority: Major
> Labels: ignite-3
> Time Spent: 2h
> Remaining Estimate: 0h
>
> Update {{RaftGroupService#changePeersAsync}} method to support changing
> learners configuration. It should work the same way, we simply need to update
> internal Raft configuration for learners as well as for peers. The new
> signature will look like the following:
> {code:java}
> /**
> * @param peers New peers.
> * @param learners New leaners.
> * @param term Current known leader term.
> * If real raft group term will be different - changePeers will
> be skipped.
> * @return A future.
> */
> CompletableFuture<Void> changePeersAsync(List<Peer> peers, List<Peer>
> learners, long term);
> {code}
> This also implies changing the signature of
> {{RaftGroupEventsListener#onNewPeersConfigurationApplied}}:
> {code:java}
> /**
> * Invoked on the leader, when new peers' configuration applied to raft group.
> *
> * @param peers list of peers, which was applied by raft group membership
> configuration.
> * @param learners list of learners, which was applied by raft group
> membership configuration.
> */
> void onNewPeersConfigurationApplied(List<PeerId> peers, List<PeerId>
> learners);
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)