-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix:Add the output data of command 'info keyspace 0' to the output of com… #2603
Conversation
src/pika_admin.cc
Outdated
tmp_stream << "# Use \"info keyspace 1\" do async statistics" | ||
<< "\r\n"; | ||
} | ||
|
||
**/ |
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.
删除
src/pika_admin.cc
Outdated
} else { | ||
tmp_stream << "# Use \"info keyspace 1\" to do async statistics\r\n"; // Command=>"info" | ||
} | ||
/**if (argv_.size() == 3){ // command => `info keyspace 1` or `info all` |
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.
不要的代码直接删除即可
Remove obsolete code
src/pika_admin.cc
Outdated
@@ -1194,15 +1196,19 @@ void InfoCmd::InfoKeyspace(std::string& info) { | |||
std::stringstream tmp_stream; | |||
tmp_stream << "# Keyspace" | |||
<< "\r\n"; | |||
if (argv_.size()> 1 && strcasecmp(argv_[1].data(), kAllSection.data()) == 0) { |
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.
if (argv_.size() > 1 && strcasecmp(argv_[1].data(), kAllSection.data()) == 0) {
tmp_stream << "# Start async statistics\r\n";
} else if (argv_.size() == 3 && strcasecmp(argv_[1].data(), kKeyspaceSection.data()) == 0) {
tmp_stream << "# Start async statistics\r\n";
} else {
tmp_stream << "# Use \"info keyspace 1\" to do async statistics\r\n";
}
这样写是不是更好一些
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.
是的,我过于执着分支了,你的代码健壮性和清晰度都更好
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.
过奖了
… com… (#2603) * Add the output data of command 'info keyspace 1' to the output of command 'info all'
… com… (OpenAtomFoundation#2603) * Add the output data of command 'info keyspace 1' to the output of command 'info all'
… com… (OpenAtomFoundation#2603) * Add the output data of command 'info keyspace 1' to the output of command 'info all'
… com… (OpenAtomFoundation#2603) * Add the output data of command 'info keyspace 1' to the output of command 'info all'
… com… (OpenAtomFoundation#2603) * Add the output data of command 'info keyspace 1' to the output of command 'info all'
Add 'info keyspace 0' output data to 'info all' #2587