Skip to content

Commit

Permalink
address some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyu85cn committed Aug 25, 2021
1 parent 3389c8a commit 7a6c094
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/clients/meta/MetaClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2323,7 +2323,7 @@ folly::Future<StatusOr<bool>> MetaClient::heartbeat() {
LOG(FATAL) << "Can't persist the clusterId in file " << FLAGS_cluster_id_path;
}
}
heartBeatTime_ = time::WallClock::fastNowInMilliSec();
heartbeatTime_ = time::WallClock::fastNowInMilliSec();
metadLastUpdateTime_ = resp.get_last_update_time_in_ms();
VLOG(1) << "Metad last update time: " << metadLastUpdateTime_;
return true; // resp.code == nebula::cpp2::ErrorCode::SUCCEEDED
Expand Down
4 changes: 2 additions & 2 deletions src/clients/meta/MetaClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ class MetaClient {

HostAddr getMetaLeader() { return leader_; }

int64_t HeartBeatTime() { return heartBeatTime_; }
int64_t HeartbeatTime() { return heartbeatTime_; }

protected:
// Return true if load succeeded.
Expand Down Expand Up @@ -742,7 +742,7 @@ class MetaClient {
bool skipConfig_ = false;
MetaClientOptions options_;
std::vector<HostAddr> storageHosts_;
int64_t heartBeatTime_;
int64_t heartbeatTime_;
};

} // namespace meta
Expand Down
2 changes: 1 addition & 1 deletion src/graph/executor/admin/ShowMetaLeaderExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ folly::Future<Status> ShowMetaLeaderExecutor::execute() {
SCOPED_TIMER(&execTime_);
auto metaLeader = qctx()->getMetaClient()->getMetaLeader();
auto now = time::WallClock::fastNowInMilliSec();
auto lastHeartBeatTime = qctx()->getMetaClient()->HeartBeatTime();
auto lastHeartBeatTime = qctx()->getMetaClient()->HeartbeatTime();
auto intervalMs = now - lastHeartBeatTime;
DataSet ds({"Meta Leader", "secs from last heart beat"});
auto strLeader = folly::sformat("{}:{}", metaLeader.host, metaLeader.port);
Expand Down

0 comments on commit 7a6c094

Please sign in to comment.