From f92944b11d5c11474ba6be9f908081f3c28903af Mon Sep 17 00:00:00 2001 From: heng Date: Fri, 12 Jul 2019 16:40:49 +0800 Subject: [PATCH] Address whitewum's comments --- src/meta/processors/admin/AdminClient.cpp | 1 + src/meta/processors/admin/BalanceTask.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/meta/processors/admin/AdminClient.cpp b/src/meta/processors/admin/AdminClient.cpp index 81b0b1bcd6c..e0d978c4b9c 100644 --- a/src/meta/processors/admin/AdminClient.cpp +++ b/src/meta/processors/admin/AdminClient.cpp @@ -329,6 +329,7 @@ StatusOr> AdminClient::getPeers(GraphSpaceID spaceId, Part case kvstore::ResultCode::ERR_KEY_NOT_FOUND: return Status::Error("Key Not Found"); default: + LOG(WARNING) << "Get peers failed, error " << static_cast(code); break; } return Status::Error("Get Failed"); diff --git a/src/meta/processors/admin/BalanceTask.cpp b/src/meta/processors/admin/BalanceTask.cpp index 8cc1286b48f..ec593396fcf 100644 --- a/src/meta/processors/admin/BalanceTask.cpp +++ b/src/meta/processors/admin/BalanceTask.cpp @@ -23,7 +23,7 @@ const std::string kBalanceTaskTable = "__b_task__"; // NOLINT void BalanceTask::invoke() { CHECK_NOTNULL(client_); if (ret_ == Result::FAILED) { - endTimeMs_ = time::WallClock::fastNowInSec(); + endTimeMs_ = time::WallClock::fastNowInMilliSec(); saveInStore(); onError_(); return; @@ -33,7 +33,7 @@ void BalanceTask::invoke() { LOG(INFO) << taskIdStr_ << "Start to move part!"; status_ = Status::CHANGE_LEADER; ret_ = Result::IN_PROGRESS; - startTimeMs_ = time::WallClock::fastNowInSec(); + startTimeMs_ = time::WallClock::fastNowInMilliSec(); } case Status::CHANGE_LEADER: { LOG(INFO) << taskIdStr_ << "Ask the src to give up the leadership.";