diff --git a/src/storage/admin/AdminTaskManager.cpp b/src/storage/admin/AdminTaskManager.cpp index ba285c96a41..fe4089421b3 100644 --- a/src/storage/admin/AdminTaskManager.cpp +++ b/src/storage/admin/AdminTaskManager.cpp @@ -135,13 +135,12 @@ 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; + continue; } } env_->adminStore_->multiRemove(keys);