-
Notifications
You must be signed in to change notification settings - Fork 312
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
Conversation
|
||
std::cout << "Diagnose ddd done." << std::endl; | ||
return true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add newline
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of使用完毕需要close掉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不用自己close,对象析构时会自动close
@@ -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) |
There was a problem hiding this comment.
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 推荐的规则吧,以后也可以写到文档里
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Former-commit-id: ce30d9dfc6c1569ec8700e6aad80059488cb8367 [formerly c27a6c0] Former-commit-id: c40267ccd9ea34a00ca764df88908842acd1c826
… read optimization (apache#175)
refer to XiaoMi/rdsn#80