From 0255318bf39debd25d0d547e4b91d8d8353ab3f4 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Wed, 1 Jun 2016 08:48:50 +0300 Subject: [PATCH] Revert "Revert "main: change order between storage service and drain execution during exit"" This reverts commit b3ed55be1dc22dc260b26f9528b979c0a65cd92d. The issue is in the failing dtest, not this commit. Gleb writes: "The bug is in the test, not the patch. Test waits for repair session to end one way or the other when node is killed, but for nodetool to know if repair is completed it needs to poll for it. If node dies before nodetool managed to see repair completion it will stuck forever since jmx is alive, but does not provide answers any more. The patch changes timing, repair is completed much close to exit now, so problem appears, but it may happen even without the patch. The fix is for dtest to kill jmx as part of killing a node operation." Now that Lucas fixed the problem in scylla-ccm, revert the revert. --- main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cc b/main.cc index 1436198b7e..3fd6450ed6 100644 --- a/main.cc +++ b/main.cc @@ -595,10 +595,10 @@ int main(int ac, char** av) { supervisor_notify("serving"); // Register at_exit last, so that storage_service::drain_on_shutdown will be called first engine().at_exit([] { - return service::get_local_storage_service().drain_on_shutdown(); + return repair_shutdown(service::get_local_storage_service().db()); }); engine().at_exit([] { - return repair_shutdown(service::get_local_storage_service().db()); + return service::get_local_storage_service().drain_on_shutdown(); }); engine().at_exit([&db] { return db.invoke_on_all([](auto& db) {