Skip to content

Commit

Permalink
Support local disaster recovery manager configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
doleyzi committed Nov 22, 2023
1 parent 3c8cc0e commit 393048d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,10 @@ void ProxyManager::UpdateGroupid2ClusterIdMap() {
}
}

void ProxyManager::BuildLocalCache(std::ofstream &file, int32_t id_index, const std::string &groupid,
void ProxyManager::BuildLocalCache(std::ofstream &file, int32_t groupid_index, const std::string &groupid,
const std::string &meta_data) {
file << "[id" << id_index << "]" << std::endl;
file << "id=" << groupid << std::endl;
file << "[groupid" << groupid_index << "]" << std::endl;
file << "groupid=" << groupid << std::endl;
file << "proxy_cfg=" << meta_data << std::endl;
}

Expand All @@ -382,7 +382,7 @@ void ProxyManager::ReadLocalCache() {
return;
}
int32_t groupid_count = 0;
if (ini.getInt("main", "id_count", &groupid_count)) {
if (ini.getInt("main", "groupid_count", &groupid_count)) {
LOG_WARN("failed to parse .proxy list.ini file");
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ProxyManager {
bool CheckClusterId(const std::string &cluster_id);
void UpdateClusterId2ProxyMap();
void UpdateGroupid2ClusterIdMap();
void BuildLocalCache(std::ofstream &file, int32_t id_index, const std::string &groupid, const std::string &meta_data);
void BuildLocalCache(std::ofstream &file, int32_t groupid_index, const std::string &groupid, const std::string &meta_data);
void ReadLocalCache();
void WriteLocalCache();
std::string RecoverFromLocalCache(const std::string&groupid);
Expand Down

0 comments on commit 393048d

Please sign in to comment.