Browse Source

!146 fix hb

From: @zhangyinxia
Reviewed-by: @zhoufeng54,@xu-yfei
Signed-off-by: @xu-yfei
tags/v1.2.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
a3a9c05ce2
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      mindspore_serving/ccsrc/common/heart_beat.h

+ 4
- 4
mindspore_serving/ccsrc/common/heart_beat.h View File

@@ -147,7 +147,7 @@ class MS_API Watcher {
std::unique_lock<std::mutex> lock{m_lock_};
if (watchee_map_[address].timeouts_ >= max_ping_times_) {
// add exit handle
MSI_LOG(INFO) << "Recv Pong Time Out from " << address;
MSI_LOG(ERROR) << "Recv Pong Time Out from " << address << ", host address is " << host_address_;
watchee_map_[address].timer_->StopTimer();
// need erase map
return;
@@ -156,7 +156,7 @@ class MS_API Watcher {
}

void RecvPingTimeOut(const std::string &address) {
MSI_LOG(INFO) << "Recv Ping Time Out from " << address;
MSI_LOG(ERROR) << "Recv Ping Time Out from " << address << ", host address is " << host_address_;
// add exit handle
watcher_map_[address].timer_->StopTimer();
// need erase map
@@ -197,8 +197,8 @@ class MS_API Watcher {
std::shared_ptr<typename RecvStub::Stub> stub_ = nullptr;
};
std::string host_address_;
uint64_t max_ping_times_ = 10;
uint64_t max_time_out_ = 10000; // 10s
uint64_t max_ping_times_ = 20;
uint64_t max_time_out_ = 20000; // 20s
std::unordered_map<std::string, WatcheeContext> watchee_map_;
std::unordered_map<std::string, WatcherContext> watcher_map_;
std::mutex m_lock_;


Loading…
Cancel
Save