-
Notifications
You must be signed in to change notification settings - Fork 487
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
[feat]curvefs: change hostname to optional #2574
Conversation
cicheck |
return -1; | ||
LOG(INFO) << "get hostname failed!"; | ||
} else { | ||
req.set_hostname(hostname); |
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.
You need change the hostName of MetaServerRegistRequest in topology.proto to optional.
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.
ok
@@ -628,7 +628,9 @@ int CurvefsBuildTopologyTool::CreateServer() { | |||
for (auto it : serverDatas) { | |||
ServerRegistRequest request; | |||
ServerRegistResponse response; | |||
request.set_hostname(it.name); | |||
if (!it.name.empty()) { | |||
request.set_hostname(it.name); |
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.
You need change hostName of ServerRegistRequest in topology.topo to optional.
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.
ok
@@ -125,7 +125,12 @@ void TopologyManager::RegistMetaServer(const MetaServerRegistRequest *request, | |||
} | |||
} | |||
|
|||
MetaServer metaserver(metaServerId, request->hostname(), token, serverId, | |||
std::string hostname; | |||
if (request->has_hostname()) { |
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.
not need, request->hostname() is empty string if hostname not set.
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.
ok
|
ditto |
@@ -79,7 +79,7 @@ message ZoneData { | |||
|
|||
message ServerData { | |||
required uint32 serverId = 1; | |||
required string hostName = 2; | |||
optional string hostName = 2; |
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.
Modify the part of curvebs accordingly.
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.
Yes, I will change the curvebs code in another pr for passing ci.
Signed-off-by: swj <1186093704@qq.com>
cicheck |
The modify of hostname is not only affect register, you need check other place used hostname like above example. |
Yes, But I find no other codes that effect by hostname after searching keyword 'hostname'. |
LGTM! |
What problem does this PR solve?
Issue Number: #2493
Problem Summary:
What is changed and how it works?
What's Changed:
How it Works:
Side effects(Breaking backward compatibility? Performance regression?):
Check List