From cf528d7df96af1435f256fd6c35f0a94ba451508 Mon Sep 17 00:00:00 2001 From: Benny Halevy Date: Sat, 27 Nov 2021 10:33:48 +0200 Subject: [PATCH] database: shutdown: don't shutdown keyspaces yet Don't shutdown the keyspaces just yet, since they are needed during shutdown. FIXME: restore when #8995 is fixed and no queries are issued after the database shuts down. Refs #8995 Fixes #9684 Test: unit(dev) - scylla-gdb test fails locally with #9677 DTest: update_cluster_layout_tests.py:TestUpdateClusterLayout.simple_add_new_node_while_adding_info_{1,2}_test(dev) - running now into #8995. dtest fails with unexpected error: "storage_proxy - Exception when communicating with 127.0.62.4, to read from system_distributed.service_levels: seastar::gate_closed_exception (gate closed)" Signed-off-by: Benny Halevy Message-Id: <20211127083348.146649-2-bhalevy@scylladb.com> --- database.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/database.cc b/database.cc index 00176b38e7..34e5e31013 100644 --- a/database.cc +++ b/database.cc @@ -2076,9 +2076,14 @@ future<> database::shutdown() { co_await close_tables(database::table_kind::user); co_await close_tables(database::table_kind::system); co_await _large_data_handler->stop(); - for (auto& [ks_name, ks] : _keyspaces) { - co_await ks.shutdown(); - } + // Don't shutdown the keyspaces just yet, + // since they are needed during shutdown. + // FIXME: restore when https://github.com/scylladb/scylla/issues/8995 + // is fixed and no queries are issued after the database shuts down. + // (see also https://github.com/scylladb/scylla/issues/9684) + // for (auto& [ks_name, ks] : _keyspaces) { + // co_await ks.shutdown(); + // } } future<> database::stop() {