Skip to content

Conversation

@JAkutenshi
Copy link
Contributor

JIRA Ticket: IGNITE-22851 | Move raft client's update configuration process into replicas

The goal

The main goal is to remove all calls RaftGroupService#updateConfiguration from TableManager.

The reason

There should no any raft client usages inside TableManager.

The solution

  1. Method Replica#updateConfiguration is introduced.
  2. All calls like raftClient -> raftClient.updateConfiguration(...) are replaced with replica -> replica.updateConfiguration(...)

Thank you for submitting the pull request.

To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:

The Review Checklist

  • Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - There is a single JIRA ticket related to the pull request.
    - The web-link to the pull request is attached to the JIRA ticket.
    - The JIRA ticket has the Patch Available state.
    - The description of the JIRA ticket explains WHAT was made, WHY and HOW.
    - The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • Design: new code conforms with the design principles of the components it is added to.
  • Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes

*
* @param configuration Peers and learners configuration.
*/
void updateConfiguration(PeersAndLearners configuration);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rename it to something like "updateReplicationClientConfiguration"? Because in the scope of Replica the meaning of "configuration" is not obvious.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to an onlibe discussion it is renamed to updatePeersAndLearners

CompletableFuture<Void> shutdown();

/**
* Updates peers and learners lists in raft client.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the generic "replication client" instead of "raft", because we want to be more abstract about replication protocol.

@sanpwc sanpwc merged commit 067ba4d into apache:main Aug 15, 2024
@sanpwc sanpwc deleted the ignite-22851-redone branch August 15, 2024 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants