Skip to content

Commit

Permalink
YDB FQ: Refactor MySQL parser (#6484)
Browse files Browse the repository at this point in the history
  • Loading branch information
skywalker-jpg authored Jul 16, 2024
1 parent dd1b532 commit 0e3aaa3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ydb/core/fq/libs/actors/database_resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,12 @@ class TDatabaseResolver: public TActor<TDatabaseResolver>
continue;
}

const auto& servicesArray = hostMap.at("services").GetArraySafe();

// check if all services of a particular host are alive
const bool alive = std::all_of(
hostMap.at("services").GetArraySafe().begin(),
hostMap.at("services").GetArraySafe().end(),
servicesArray.begin(),
servicesArray.end(),
[](const auto& service) {
return service["health"].GetString() == "ALIVE";
}
Expand Down

0 comments on commit 0e3aaa3

Please sign in to comment.