From 409be35388aee1f7efddf5e8194972ffb3d152f0 Mon Sep 17 00:00:00 2001 From: liwenhui-soul <38217397+liwenhui-soul@users.noreply.github.com> Date: Wed, 4 Jan 2023 16:20:16 +0800 Subject: [PATCH] minor bug --- 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);