Skip to content

Commit

Permalink
Merge branch 'master' into fix-login-check
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiee authored Jan 5, 2022
2 parents 9dcb7c8 + 80b7052 commit 0de100b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/meta/processors/parts/CreateSpaceProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ void CreateSpaceProcessor::process(const cpp2::CreateSpaceReq& req) {
for (auto& host : hosts) {
auto key = MetaKeyUtils::hostKey(host.host, host.port);
auto ret = doGet(key);
if (!nebula::ok(ret)) {
code = nebula::error(zoneValueRet);
LOG(ERROR) << "Get host " << host << " failed.";
break;
}

HostInfo info = HostInfo::decode(nebula::value(ret));
if (now - info.lastHBTimeInMilliSec_ <
FLAGS_heartbeat_interval_secs * FLAGS_expired_time_factor * 1000) {
Expand All @@ -206,6 +212,8 @@ void CreateSpaceProcessor::process(const cpp2::CreateSpaceReq& req) {
LOG(WARNING) << "Host " << host << " expired";
}
}

CHECK_CODE_AND_BREAK();
zoneHosts[zone] = std::move(hosts);
}

Expand Down

0 comments on commit 0de100b

Please sign in to comment.