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

Method DoStateTransition

src/master/tabletnode_manager.cc:292–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290}
291
292bool TabletNode::DoStateTransition(NodeEvent event) {
293 MutexLock lock(&mutex_);
294 NodeState post_state;
295 if (!state_transitions_.DoStateTransition(state_, event, &post_state)) {
296 LOG(WARNING) << "node: " << addr_ << ", uuid: " << uuid_
297 << ", illegal transition state: " << StatusCodeToString((StatusCode)state_)
298 << ", event: " << event;
299 return false;
300 }
301 LOG(INFO) << "node: " << addr_ << ", uuid: " << uuid_ << ", state switch: "
302 << ", event: " << event << StatusCodeToString((StatusCode)state_)
303 << ", post state: " << StatusCodeToString((StatusCode)post_state);
304 state_ = post_state;
305 return true;
306}
307
308uint32_t TabletNode::GetQueryFailCount() {
309 MutexLock lock(&mutex_);

Callers 2

AddTabletNodeMethod · 0.45
DelTabletNodeMethod · 0.45

Calls 1

StatusCodeToStringFunction · 0.85

Tested by

no test coverage detected