MCPcopy Create free account
hub / github.com/baidu/tera / IsAbnormalNode

Method IsAbnormalNode

src/master/abnormal_node_mgr.cc:56–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56bool AbnormalNodeMgr::IsAbnormalNode(const std::string& addr, const std::string& uuid) {
57 MutexLock lock(&mutex_);
58 if (nodes_abnormal_infos_.find(addr) == nodes_abnormal_infos_.end()) {
59 return false;
60 }
61
62 NodeAbnormalInfo& info = nodes_abnormal_infos_[addr];
63 if (get_micros() / 1000000 >= info.recovery_time) {
64 return false;
65 } else {
66 DelayAddNode(addr, uuid);
67 return true;
68 }
69}
70
71std::string AbnormalNodeMgr::GetNodeInfo(const std::string& addr) {
72 MutexLock lock(&mutex_);

Callers 2

AddTabletNodeMethod · 0.45
TEST_FFunction · 0.45

Calls 1

get_microsFunction · 0.50

Tested by 1

TEST_FFunction · 0.36