Do not die if a peer is already stopped on flush error

sync-io-test
Vitaliy Filippov 2020-06-01 23:06:31 +03:00
parent e6a4b634f8
commit 0fcdeae18b
1 changed files with 6 additions and 3 deletions

View File

@ -78,9 +78,12 @@ void osd_t::handle_flush_op(bool rollback, pg_num_t pg_num, pg_flush_batch_t *fb
}
else
{
printf("Error while doing flush on OSD %lu: %s\n", osd_num, strerror(-retval));
assert(c_cli.osd_peer_fds.find(peer_osd) != c_cli.osd_peer_fds.end());
c_cli.stop_client(c_cli.osd_peer_fds[peer_osd]);
printf("Error while doing flush on OSD %lu: %d (%s)\n", osd_num, retval, strerror(-retval));
auto fd_it = c_cli.osd_peer_fds.find(peer_osd);
if (fd_it != c_cli.osd_peer_fds.end())
{
c_cli.stop_client(fd_it->second);
}
return;
}
}