Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Refactor the method 'check_leader' make it return a enum class type #1406

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

WHBANG
Copy link
Contributor

@WHBANG WHBANG commented Mar 22, 2023

What problem does this PR solve?

#1405

The purpose of this patch is to make method check_leader return enumeration class
type(meta_leader_state) instead of int, to avoid making mistake.

Refactor the following two methods and the methods that use them:

int check_leader(dsn::message_ex *req, dsn::rpc_address *forward_address);

template <typename TRpcHolder>
int check_leader(TRpcHolder rpc, /*out*/ rpc_address *forward_address);

void meta_service::on_start_recovery(configuration_recovery_rpc rpc);

bool meta_service::check_status(TRpcHolder rpc, rpc_address *forward_address);

@github-actions github-actions bot added the cpp label Mar 22, 2023
@empiredan empiredan merged commit 1693330 into apache:master Mar 23, 2023
@empiredan empiredan mentioned this pull request Aug 21, 2023
GehaFearless pushed a commit to GehaFearless/incubator-pegasus that referenced this pull request Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants