-
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 create space on empty hosts #2967
fix create space on empty hosts #2967
Conversation
@@ -307,6 +313,12 @@ StatusOr<Hosts> CreateSpaceProcessor::pickHostsWithZone( | |||
hostLoading_[picked] += 1; | |||
pickedHosts.emplace_back(toThriftHost(std::move(picked))); | |||
} | |||
|
|||
if (code != nebula::cpp2::ErrorCode::SUCCEEDED) { | |||
handleErrorCode(nebula::cpp2::ErrorCode::E_NO_HOSTS); |
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.
handleErrorCode(code)
is better?
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.
Good Cache & fixed
dc5f6df
to
a2ee7f3
Compare
Why the drop can be succeeded? |
😄,Am I too positive? |
Confirmed with @darionyaphet, it is ok. But we can't drop when we any hosts in zone has a valid space |
So, at any time, host cannot be empty when show zones, right? For example, the result below is invalid
|
|
not correct some times we will replace host in zone and could occur empty hosts |
There are some questions here, I think that at any time a zone must be bound to a host. If user want to replace the host of a zone, must add host to zone first, and then drop the old host from zone. right? |
To dispel doubts, I can limit the empty zone hosts |
if a user needs to drop zone, the zone must have no hosts, it may be conflicted. scenarios here:
|
I do not know why create space on empty hosts .