MCPcopy Create free account
hub / github.com/Tencent/phxsql / IsMaster

Method IsMaster

phxbinlogsvr/core/handler/master_manager.cpp:91–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91bool MasterManager::IsMaster(const MasterInfo &info) {
92 return info.svr_id() == option_->GetBinLogSvrConfig()->GetEngineSvrID() && !IsTimeOut(info);
93}
94
95bool MasterManager::IsMaster() {
96 return storage_->CheckMasterBySvrID(option_->GetBinLogSvrConfig()->GetEngineSvrID());

Callers 3

SendValueMethod · 0.80
SetMasterMethod · 0.80
CheckRunningStatusMethod · 0.80

Calls 3

GetEngineSvrIDMethod · 0.80
GetBinLogSvrConfigMethod · 0.80
CheckMasterBySvrIDMethod · 0.45

Tested by

no test coverage detected