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

Method LoadFromCheckPoint

phxbinlogsvr/core/storage/master_storage.cpp:41–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41int MasterStorage::LoadFromCheckPoint(const MasterInfo &info) {
42 if (info.version() > 0) {
43 master_ = info;
44 master_.set_expire_time(
45 time(NULL) + option_->GetBinLogSvrConfig()->GetMasterLeaseTime()
46 + option_->GetBinLogSvrConfig()->GetMasterExtLeaseTime());
47 }
48 return OK;
49}
50
51std::string MasterStorage::GetAdminUserName() {
52 RWLockManager lock(&mutex_, RWLockManager::READ);

Callers

nothing calls this directly

Calls 3

GetMasterLeaseTimeMethod · 0.80
GetBinLogSvrConfigMethod · 0.80
GetMasterExtLeaseTimeMethod · 0.80

Tested by

no test coverage detected