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

shell: add ddd_diagnose command #175

Merged
merged 4 commits into from
Sep 6, 2018
Merged

shell: add ddd_diagnose command #175

merged 4 commits into from
Sep 6, 2018

Conversation

qinzuoyan
Copy link
Contributor

@qinzuoyan qinzuoyan commented Sep 5, 2018

refer to XiaoMi/rdsn#80


std::cout << "Diagnose ddd done." << std::endl;
return true;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

add newline

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

std::ofstream of;

if (!out_file.empty()) {
of.open(out_file);
Copy link
Member

Choose a reason for hiding this comment

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

of使用完毕需要close掉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

不用自己close,对象析构时会自动close

acelyc111
acelyc111 previously approved these changes Sep 5, 2018
@@ -4310,3 +4310,228 @@ inline bool clear_app_envs(command_executor *e, shell_context *sc, arguments arg
}
return true;
}

inline dsn::rpc_address diagnose_recommend(const ddd_partition_info &pinfo)
Copy link
Contributor

Choose a reason for hiding this comment

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

加个注释吧

// Select a best node to be the new primary after a DDD situation, following the rule:
//  - choose the node with largest committed decree
//  - if committed decree is the same, choose the node with largest ballot

不知道规则有没有理解对,另外在 pr description 里面描述一下 DDD 推荐的规则吧,以后也可以写到文档里

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

neverchanje
neverchanje previously approved these changes Sep 6, 2018
@qinzuoyan qinzuoyan merged commit c27a6c0 into master Sep 6, 2018
@qinzuoyan qinzuoyan deleted the qinzuoyan branch September 6, 2018 04:39
@neverchanje neverchanje added the component/shell pegasus shell label Sep 13, 2018
neverchanje pushed a commit to neverchanje/pegasus that referenced this pull request Jul 13, 2019
Former-commit-id: ce30d9dfc6c1569ec8700e6aad80059488cb8367 [formerly c27a6c0]
Former-commit-id: c40267ccd9ea34a00ca764df88908842acd1c826
cauchy1988 added a commit to cauchy1988/incubator-pegasus that referenced this pull request May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/shell pegasus shell
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants