-
Notifications
You must be signed in to change notification settings - Fork 526
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
curvefs/tool: fix copyset health check error #1024
curvefs/tool: fix copyset health check error #1024
Conversation
recheck |
for (auto const& i : key2Info) { | ||
if (copyset::checkCopysetHelthy(i.second, key2Status[i.first]) != | ||
copyset::CheckResult::kHealthy) { | ||
isHealth = false; |
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.
The unhealthy copysets can be recorded and show the detail if needed.
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.
The unhealthy copysets can be recorded and show the detail if needed.
now is show all copyset, will add this feature.
std::vector<curvefs::metaserver::copyset::CopysetStatusResponse>> | ||
key2Status; | ||
copyset::CopysetInfo2CopysetStatus(*response.get(), &key2Status); | ||
copyInfoListTool_->RunCommand(); |
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.
why drop the return value?
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.
why drop the return value?
fix
std::map<uint64_t, | ||
std::vector<curvefs::metaserver::copyset::CopysetStatusResponse>> | ||
key2Status; | ||
copyset::CopysetInfo2CopysetStatus(*response.get(), &key2Status); |
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.
ditto, you didn't handle return value
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.
fix
|
||
copyset::Response2CopysetInfo(*response.get(), &key2Info); | ||
copyset::Response2CopysetInfo(*response.get(), &key2Info); |
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.
ditto
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.
ditto
fix
when get all coysetinfo (in curvefs_copyset_status) has error, tools would not to check copyset status, so get health instaed of unhealthy
ddc8e9b
to
1c45b4c
Compare
recheck |
1 similar comment
recheck |
What problem does this PR solve?
Issue Number: close #1022 #1026
Problem Summary:
when get all coysetinfo (in curvefs_copyset_status) has error,
tools would not to check copyset status,
so get health instaed of unhealthy
What is changed and how it works?
What's Changed:
How it Works:
Side effects(Breaking backward compatibility? Performance regression?):
Check List