Skip to content

Commit 72cc172

Browse files
revert change in is_initial_sync_complete
1 parent 7972a35 commit 72cc172

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/object-store/util/sync/baas_admin_api.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,8 +1081,14 @@ bool AdminAPISession::is_initial_sync_complete(const std::string& app_id) const
10811081
{
10821082
auto progress_endpoint = apps()[app_id]["sync"]["progress"];
10831083
auto progress_result = progress_endpoint.get_json();
1084-
if (auto it = progress_result.find("accepting_clients"); it != progress_result.end()) {
1085-
return it->get<bool>();
1084+
if (auto it = progress_result.find("progress"); it != progress_result.end() && it->is_object() && !it->empty()) {
1085+
for (auto& elem : *it) {
1086+
auto is_complete = elem["complete"];
1087+
if (!is_complete.is_boolean() || !is_complete.get<bool>()) {
1088+
return false;
1089+
}
1090+
}
1091+
return true;
10861092
}
10871093
return false;
10881094
}

0 commit comments

Comments
 (0)