Skip to content

Commit

Permalink
improve log
Browse files Browse the repository at this point in the history
  • Loading branch information
pengweisong committed Dec 27, 2022
1 parent 8145187 commit de5138a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/clients/meta/MetaClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/meta/processors/admin/CreateBackupProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions src/meta/processors/job/JobManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,10 @@ ErrorOr<nebula::cpp2::ErrorCode, bool> 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;
}
}
Expand Down

0 comments on commit de5138a

Please sign in to comment.