From 702f6ee1b79581d751f929ef4fab3e6ec008549f Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Thu, 23 Aug 2018 11:20:26 +0200 Subject: [PATCH] database: Run system table flushes in the main scheduling group memtable flushes for system and regular region groups run under the memtable_scheduling_group, but the controller adjusts shares based on the occupancy of the regular region group. It can happen that regular is not under pressure, but system is. In this case the controller will incorrectly assign low shares to the memtable flush of system. This may result in high latency and low throughput for writes in the system group. I observed writes to the sytem keyspace timing out (on scylla-2.3-rc2) in the dtest: limits_test.py:TestLimits.max_cells_test, which went away after this. Fixes #3717. Message-Id: <1535016026-28006-1-git-send-email-tgrabiec@scylladb.com> (cherry picked from commit 10f6b125c8c77b5914b4c7e52350639e027a989a) --- db/system_keyspace.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/system_keyspace.cc b/db/system_keyspace.cc index 53558e4bef..a0baa7160f 100644 --- a/db/system_keyspace.cc +++ b/db/system_keyspace.cc @@ -1635,6 +1635,9 @@ void make(database& db, bool durable, bool volatile_testing_only) { auto cfg = ks.make_column_family_config(*table, db.get_config(), db.get_large_partition_handler()); if (maybe_write_in_user_memory(table, db)) { cfg.dirty_memory_manager = &db._dirty_memory_manager; + } else { + cfg.memtable_scheduling_group = default_scheduling_group(); + cfg.memtable_to_cache_scheduling_group = default_scheduling_group(); } db.add_column_family(ks, table, std::move(cfg)); maybe_add_virtual_reader(table, db);