From f840eea132dcd3805866325ac5b230796fc4bd24 Mon Sep 17 00:00:00 2001 From: liwenhui-soul <38217397+liwenhui-soul@users.noreply.github.com> Date: Thu, 5 Jan 2023 20:29:58 +0800 Subject: [PATCH] minor bug for adminTaskManager (#5195) --- src/storage/admin/AdminTaskManager.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/storage/admin/AdminTaskManager.cpp b/src/storage/admin/AdminTaskManager.cpp index ba285c96a41..80985f17a40 100644 --- a/src/storage/admin/AdminTaskManager.cpp +++ b/src/storage/admin/AdminTaskManager.cpp @@ -122,7 +122,7 @@ void AdminTaskManager::handleUnreportedTasks() { jId, tId, fut.value().status().toString()); - if (fut.value().status() == Status::Error("Space not existed!")) { + if (fut.value().status() == Status::SpaceNotFound("Space not existed!")) { // space has been dropped, remove the task status. keys.emplace_back(key.data(), key.size()); } else { @@ -135,13 +135,10 @@ void AdminTaskManager::handleUnreportedTasks() { jId, tId, apache::thrift::util::enumNameSafe(rc)); - if (rc == nebula::cpp2::ErrorCode::E_LEADER_CHANGED || - rc == nebula::cpp2::ErrorCode::E_STORE_FAILURE) { - ifAnyUnreported_ = true; - continue; - } else { + if (rc == nebula::cpp2::ErrorCode::SUCCEEDED) { keys.emplace_back(key.data(), key.size()); - break; + } else { + ifAnyUnreported_ = true; } } env_->adminStore_->multiRemove(keys);