MCPcopy Create free account
hub / github.com/Tencent/phxqueue / AdjustMasterRate

Method AdjustMasterRate

phxqueue/store/keepmasterthread.cpp:137–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137void KeepMasterThread::AdjustMasterRate() {
138 comm::RetCode ret;
139
140 const int topic_id{impl_->store->GetTopicID()};
141
142 shared_ptr<const config::TopicConfig> topic_config;
143 if (comm::RetCode::RET_OK !=
144 (ret = config::GlobalConfig::GetThreadInstance()->
145 GetTopicConfigByTopicID(topic_id, topic_config))) {
146 QLErr("GetTopicConfigByTopicID ret %d topic_id %d", ret, topic_id);
147 return;
148 }
149
150 impl_->master_rate = topic_config->GetProto().topic().store_adjust_max_master_rate();
151}
152
153void KeepMasterThread::KeepMaster() {
154 comm::RetCode ret;

Callers

nothing calls this directly

Calls 2

GetTopicIDMethod · 0.45

Tested by

no test coverage detected