File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
test/object-store/util/sync Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments