From c47a2d32fac9a7adbcda95b9681d54b9e0f376a3 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 19 Jun 2019 14:20:47 +0300 Subject: [PATCH] Fix mxs1980_blr_galera_server_ids A housekeeping task cannot be removed by name from within the task function itself. Instead the function must simply return false. --- maxutils/maxbase/src/worker.cc | 5 ++++- server/modules/routing/binlogrouter/blr_master.cc | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/maxutils/maxbase/src/worker.cc b/maxutils/maxbase/src/worker.cc index 7b9638168..f060a8225 100644 --- a/maxutils/maxbase/src/worker.cc +++ b/maxutils/maxbase/src/worker.cc @@ -1032,7 +1032,10 @@ bool Worker::cancel_delayed_call(uint32_t id) } else { - mxb_assert(!true); + mxb_assert_message(!true, + "Attempt to remove delayed call using non-existent id %u. " + "Calling hktask_remove() from the task function? Simply " + "return false instead.", id); MXB_WARNING("Attempt to remove a delayed call, associated with non-existing id."); } diff --git a/server/modules/routing/binlogrouter/blr_master.cc b/server/modules/routing/binlogrouter/blr_master.cc index a5f42a80c..f9fdaa4e4 100644 --- a/server/modules/routing/binlogrouter/blr_master.cc +++ b/server/modules/routing/binlogrouter/blr_master.cc @@ -1470,7 +1470,6 @@ static bool blr_check_last_master_event(void* inst) "%s heartbeat", router->service->name()); - hktask_remove(task_name); router->heartbeat_task_active = false; }