From 8331896d8a08d71c427f137a4c55ae4ae0c7d508 Mon Sep 17 00:00:00 2001 From: yaphet <4414314+darionyaphet@users.noreply.github.com> Date: Mon, 17 Jan 2022 23:17:58 +0800 Subject: [PATCH] drop host only when it registe heartbeat (#3739) --- src/meta/processors/zone/DropHostsProcessor.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/meta/processors/zone/DropHostsProcessor.cpp b/src/meta/processors/zone/DropHostsProcessor.cpp index f9138b7061e..c27bc9f53c6 100644 --- a/src/meta/processors/zone/DropHostsProcessor.cpp +++ b/src/meta/processors/zone/DropHostsProcessor.cpp @@ -137,10 +137,9 @@ void DropHostsProcessor::process(const cpp2::DropHostsReq& req) { ret = hostExist(hostKey); if (ret != nebula::cpp2::ErrorCode::SUCCEEDED) { LOG(ERROR) << "The host " << host << " not existed!"; - code = nebula::cpp2::ErrorCode::E_NO_HOSTS; - break; + } else { + holder->remove(std::move(hostKey)); } - holder->remove(std::move(hostKey)); } if (code != nebula::cpp2::ErrorCode::SUCCEEDED) {