Do not wait for down OSDs during sync

Fixes a hang introduced in 0.5.11 in the non-immediate_commit mode
allow-etcd-address-option
Vitaliy Filippov 2021-05-01 00:20:23 +03:00
parent 818ae5d61d
commit 4a7365660d
1 changed files with 5 additions and 4 deletions

View File

@ -954,13 +954,14 @@ int cluster_client_t::continue_sync(cluster_op_t *op)
return 1;
}
// Check that all OSD connections are still alive
for (auto sync_osd: dirty_osds)
for (auto do_it = dirty_osds.begin(); do_it != dirty_osds.end(); )
{
osd_num_t sync_osd = *do_it;
auto peer_it = msgr.osd_peer_fds.find(sync_osd);
if (peer_it == msgr.osd_peer_fds.end())
{
return 0;
}
dirty_osds.erase(do_it++);
else
do_it++;
}
// Post sync to affected OSDs
for (auto & prev_op: dirty_buffers)