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

fix create space assign offline host #3583

Merged
merged 5 commits into from
Jan 4, 2022

Conversation

darionyaphet
Copy link
Contributor

@darionyaphet darionyaphet commented Dec 29, 2021

What type of PR is this?

  • bug
  • feature
  • enhancement

What does this PR do?

  1. avoid assigning partition on the node which is offline.
  2. drop heartbeat info from meta when it is removed.

Which issue(s)/PR(s) this PR relates to?

Special notes for your reviewer, ex. impact of this fix, etc:

Additional context/ Design document:

Checklist:

  • Documentation affected (Please add the label if documentation needs to be modified.)
  • Incompatibility (If it breaks the compatibility, please describe it and add the corresponding label.)
  • If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
  • Performance impacted: Consumes more CPU/Memory

Release notes:

Please confirm whether to be reflected in release notes and how to describe:

                                                            `

@@ -98,7 +99,10 @@ void AddHostsIntoZoneProcessor::process(const cpp2::AddHostsIntoZoneReq& req) {
zoneHosts.insert(zoneHosts.end(), hosts.begin(), hosts.end());
data.emplace_back(std::move(zoneKey), MetaKeyUtils::zoneVal(std::move(zoneHosts)));

HostInfo info(0, cpp2::HostRole::STORAGE, "");
auto now = time::WallClock::fastNowInMilliSec();
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need to write a hostKey here? If the host is alive, it will report to meta by heartbeat later, if not alive, there won't be any heartbeat.

Previously we only write this key in ActiveHostsMan.

@@ -62,7 +65,10 @@ void AddHostsProcessor::process(const cpp2::AddHostsReq& req) {
return;
}

HostInfo info(0, cpp2::HostRole::STORAGE, "");
auto now = time::WallClock::fastNowInMilliSec();
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

critical27
critical27 previously approved these changes Dec 30, 2021
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.

LGTM now

liwenhui-soul
liwenhui-soul previously approved these changes Dec 30, 2021
@Sophie-Xie Sophie-Xie added the cherry-pick-v3.0 PR: need cherry-pick to this version label Jan 4, 2022
@critical27 critical27 merged commit f52a964 into vesoft-inc:master Jan 4, 2022
Sophie-Xie pushed a commit that referenced this pull request Jan 10, 2022
* fix create space

* fix test case

Co-authored-by: Harris.Chu <1726587+HarrisChu@users.noreply.github.com>
critical27 added a commit that referenced this pull request Jan 10, 2022
* Fix typos (#3615)

Co-authored-by: kyle.cao <kyle.cao@vesoft.com>

* fix fetch edges tostring (#3613)

Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com>
Co-authored-by: Yichen Wang <18348405+Aiee@users.noreply.github.com>

* fix create space assign offline host (#3583)

* fix create space

* fix test case

Co-authored-by: Harris.Chu <1726587+HarrisChu@users.noreply.github.com>

* Disable ARM version docker image since related third party not ready (#3618)

* Unify raft error code (#3620)

* Meta upgrader v3 (#3540)

* Replace group when create space

* Support white list

* fix test case

* support zone operations

* fix

* Support meta upgrade v3

* add more check about parse host result (#3628)

* Ut fix (#3611)

* Enable ut and fix chaindelete

* Add mock server default worker

* fix service crash (#3616)

* Cleanup branch param in package script (#3622)

* fix crash when the expression exceed the depth (#3606)

* Enhance login password check (#3629)

* fix_batch_insert_problem (#3627)

* filter data before batch insert

* add test cases

* add more testcase

* add notifyStop() for metaClient (#3621)

* add notifyStop() for metaClient

* do clean

* Fix removeSession() (#3651)

Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com>

* Issue3373 storage exit crash (#3553)

* use rcu replace thread local

fix storage exit crash

format

address some comment

* fix bug

* fix bug

* Fix coalesce bug (#3653)

* fix coalesce

* fix test

* add test

* add tck

* fix

* fix

* fix

* delete double check agg in where clause (#3647)

Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com>
Co-authored-by: cpw <13495049+CPWstatic@users.noreply.github.com>

* fix meta crash after create space (#3660)

Co-authored-by: Yichen Wang <18348405+Aiee@users.noreply.github.com>

Co-authored-by: Yichen Wang <18348405+Aiee@users.noreply.github.com>
Co-authored-by: kyle.cao <kyle.cao@vesoft.com>
Co-authored-by: jimingquan <mingquan.ji@vesoft.com>
Co-authored-by: yaphet <4414314+darionyaphet@users.noreply.github.com>
Co-authored-by: Harris.Chu <1726587+HarrisChu@users.noreply.github.com>
Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com>
Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com>
Co-authored-by: Alex Xing <90179377+SuperYoko@users.noreply.github.com>
Co-authored-by: endy.li <25311962+heroicNeZha@users.noreply.github.com>
Co-authored-by: lionel.liu@vesoft.com <52276794+liuyu85cn@users.noreply.github.com>
Co-authored-by: hs.zhang <22708345+cangfengzhs@users.noreply.github.com>
Co-authored-by: jakevin <30525741+jackwener@users.noreply.github.com>
Co-authored-by: cpw <13495049+CPWstatic@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-v3.0 PR: need cherry-pick to this version ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants