From de5138a54d5ea47c6250028e5affb6bea84030cc Mon Sep 17 00:00:00 2001 From: pengweisong <90180021+pengweisong@users.noreply.github.com> Date: Sat, 24 Dec 2022 00:34:19 +0800 Subject: [PATCH] improve log --- src/clients/meta/MetaClient.cpp | 2 +- src/meta/processors/admin/CreateBackupProcessor.cpp | 4 ++-- src/meta/processors/job/JobManager.cpp | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/clients/meta/MetaClient.cpp b/src/clients/meta/MetaClient.cpp index 426e95608eb..13a10550fdd 100644 --- a/src/clients/meta/MetaClient.cpp +++ b/src/clients/meta/MetaClient.cpp @@ -934,7 +934,7 @@ Status MetaClient::handleResponse(const RESP& resp) { case nebula::cpp2::ErrorCode::E_BACKUP_FAILED: return Status::Error("Backup failure!"); case nebula::cpp2::ErrorCode::E_BACKUP_RUNNING_JOBS: - return Status::Error("Backup encounter running or queue jobs!"); + return Status::Error("Backup encounter running or queued jobs!"); case nebula::cpp2::ErrorCode::E_BACKUP_SPACE_NOT_FOUND: return Status::Error("The space is not found when backup!"); case nebula::cpp2::ErrorCode::E_RESTORE_FAILURE: diff --git a/src/meta/processors/admin/CreateBackupProcessor.cpp b/src/meta/processors/admin/CreateBackupProcessor.cpp index ba7ee9d9ed7..9d2e10b346a 100644 --- a/src/meta/processors/admin/CreateBackupProcessor.cpp +++ b/src/meta/processors/admin/CreateBackupProcessor.cpp @@ -97,8 +97,8 @@ void CreateBackupProcessor::process(const cpp2::CreateBackupReq& req) { return; } if (nebula::value(result)) { - LOG(INFO) << "Index rebuilding/Compact/Ingest/Balace job is running or queue, not allowed to " - "create backup."; + LOG(INFO) << "There is some running or queued job mutating the data, not allowed to " + "create backup now."; handleErrorCode(nebula::cpp2::ErrorCode::E_BACKUP_RUNNING_JOBS); onFinished(); return; diff --git a/src/meta/processors/job/JobManager.cpp b/src/meta/processors/job/JobManager.cpp index 2d889d5a847..a2119e0d39d 100644 --- a/src/meta/processors/job/JobManager.cpp +++ b/src/meta/processors/job/JobManager.cpp @@ -1011,6 +1011,10 @@ ErrorOr JobManager::checkTypeJobRunning( auto status = jobDesc.getStatus(); if (status == cpp2::JobStatus::QUEUE || status == cpp2::JobStatus::RUNNING) { + LOG(INFO) << folly::sformat("The {} job is {} in space {}", + apache::thrift::util::enumNameSafe(jType), + apache::thrift::util::enumNameSafe(status), + spaceId); return true; } }