Skip to content
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

Use active hosts when creating space #425

Merged
merged 3 commits into from
May 29, 2019
Merged

Conversation

dangleptr
Copy link
Contributor

@dangleptr dangleptr commented May 24, 2019

subtask of #283

Add a flag hosts_whitelist_enabled to control whether we filter host in white list or not after received hb.

@dangleptr dangleptr added the ready-for-testing PR: ready for the CI test label May 24, 2019
@dangleptr
Copy link
Contributor Author

Jenkins go

@nebula-community-bot
Copy link
Member

Unit testing passed.

if ((int32_t)hosts.size() < replicaFactor) {
LOG(ERROR) << "Not enough hosts existed for replica "
<< replicaFactor << ", hosts num " << hosts.size();
resp_.set_code(cpp2::ErrorCode::E_UNSUPPORTED);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsupport is the meaning that this operation does not implement.

Illegal_Argument will be better ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thrift will return its own failure if related method does not implement. So i think UNSUPPORTED is ok in this case.

if (FLAGS_hosts_whitelist_enabled
&& hostExist(MetaServiceUtils::hostKey(host.first, host.second))
== Status::HostNotFound()) {
LOG(INFO) << "Reject unregistered host " << host << "!";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOG(ERROR)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it is not an error.

@dangleptr dangleptr requested a review from critical27 May 28, 2019 02:37
@dangleptr
Copy link
Contributor Author

Let's merge it firstly to avoid pending tasks in the next.

@dangleptr
Copy link
Contributor Author

@darionyaphet @critical27

@dangleptr
Copy link
Contributor Author

Jenkins go

Copy link
Contributor

@critical27 critical27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to call registerHB in all ut with listHosts?

@nebula-community-bot
Copy link
Member

Unit testing passed.

1 similar comment
@nebula-community-bot
Copy link
Member

Unit testing passed.

@dangleptr dangleptr merged commit 86cc984 into vesoft-inc:master May 29, 2019
@dangleptr dangleptr deleted the host branch May 29, 2019 04:59
@sherman-the-tank
Copy link
Member

Let's merge it firstly to avoid pending tasks in the next.

This SHOULD NOT be the reason to get PR approved! PLEASE remember you are responsible for your vote!

We need to make sure all code committed are high quality, not temporary. Especially NOT just to avoid merge conflict.

@dangleptr
Copy link
Contributor Author

dangleptr commented May 29, 2019

Let's merge it firstly to avoid pending tasks in the next.

This SHOULD NOT be the reason to get PR approved! PLEASE remember you are responsible for your vote!

We need to make sure all code committed are high quality, not temporary. Especially NOT just to avoid merge conflict.

Do you have any concerns about this pr? @sherman-the-tank

@dangleptr
Copy link
Contributor Author

This SHOULD NOT be the reason to get PR approved! PLEASE remember you are responsible for your vote!

This pr have been reviewed, don't you see the comments by @darionyaphet ?
And @critical27 has been worked around the work recently. Why you say this pr is not reviewed?
I have left enough time for all your guys to review each pr each time.

You could have no suggestions or comments, and you could vote -1 if you have any other thoughts, but please don't say the pr is NOT reviewed just because you haven't reviewed it. @sherman-the-tank

yixinglu pushed a commit to yixinglu/nebula that referenced this pull request Feb 16, 2020
* Use active hosts when creating space

* x
tong-hao pushed a commit to tong-hao/nebula that referenced this pull request Jun 1, 2021
* Use active hosts when creating space

* x
yixinglu pushed a commit to yixinglu/nebula that referenced this pull request Mar 21, 2022
…dges if we use go reversely (vesoft-inc#425)

* Fix the issue that the query results will still contain the expired edges if we use go reversely

* fix the code lint error

Co-authored-by: Doodle <[email protected]>

Co-authored-by: Ryan <[email protected]>
Co-authored-by: Doodle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants