Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
foreverneverer committed Mar 9, 2020
1 parent 20c3cb7 commit d39828c
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions src/dist/replication/lib/replica_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -910,25 +910,29 @@ void replica_stub::on_query_disk_info(const query_disk_info_request &req,
{
zauto_read_lock l(_replicas_lock);
bool app_existed = false;
for (auto replica : _replicas) {
for (const auto &replica : _replicas) {
const app_info &info = *(replica.second)->get_app_info();
if (info.app_id == req.app_id) {
app_existed = true;
break;
}
}
for (auto closing_replica : _closing_replicas) {
const app_info &info = std::get<2>(closing_replica.second);
if (info.app_id == req.app_id && !app_existed) {
app_existed = true;
break;
if (!app_existed) {
for (const auto &closing_replica : _closing_replicas) {
const app_info &info = std::get<2>(closing_replica.second);
if (info.app_id == req.app_id) {
app_existed = true;
break;
}
}
}
for (auto closed_replica : _closed_replicas) {
const app_info &info = closed_replica.second.first;
if (info.app_id == req.app_id && !app_existed) {
app_existed = true;
break;
if (!app_existed) {
for (const auto &closed_replica : _closed_replicas) {
const app_info &info = closed_replica.second.first;
if (info.app_id == req.app_id) {
app_existed = true;
break;
}
}
}

Expand Down

0 comments on commit d39828c

Please sign in to comment.