MCPcopy Create free account
hub / github.com/apache/kvrocks / ClearMaster

Method ClearMaster

src/config/config.cc:855–865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

853}
854
855void Config::ClearMaster() {
856 master_host.clear();
857 master_port = 0;
858 auto iter = fields_.find("slaveof");
859 if (iter != fields_.end()) {
860 auto s = iter->second->Set("no one");
861 if (!s.IsOK()) {
862 ERROR("Failed to clear the value of 'slaveof' setting: {}", s.Msg());
863 }
864 }
865}
866
867Status Config::parseConfigFromPair(const std::pair<std::string, std::string> &input, int line_number) {
868 std::string field_key = util::ToLower(input.first);

Callers 1

RemoveMasterMethod · 0.80

Calls 4

endMethod · 0.80
SetMethod · 0.45
IsOKMethod · 0.45
MsgMethod · 0.45

Tested by

no test coverage detected