It fixes the bug when the handle_start_replay detected the cancel
when it called on_replay_interrupted and returned without
completing m_on_start_finish context.
This is a direct commit to nautilus. The bug was accidentally
fixed in newer versions during refactoring.
Signed-off-by: Mykola Golub <mgolub@suse.com>
void ImageReplayer<I>::handle_start_replay(int r) {
dout(10) << "r=" << r << dendl;
- if (r < 0) {
+ if (on_start_interrupted()) {
+ return;
+ } else if (r < 0) {
ceph_assert(m_local_replay == nullptr);
derr << "error starting external replay on local image "
<< m_local_image_id << ": " << cpp_strerror(r) << dendl;
update_mirror_image_status(true, boost::none);
reschedule_update_status_task(30);
- if (on_replay_interrupted()) {
- return;
- }
-
{
CephContext *cct = static_cast<CephContext *>(m_local->cct());
double poll_seconds = cct->_conf.get_val<double>(