Kill scylla option to configure number of compaction groups
The option was introduced to bootstrap the project. It's still useful for testing, but that translates into maintaining an additional option and code that will not be really used outside of testing. A possible option is to later map the option in boost tests to initial_tablets, which may yield the same effect for testing. Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com>
This commit is contained in:
@@ -1002,7 +1002,6 @@ db::config::config(std::shared_ptr<db::extensions> exts)
|
||||
, nodeops_heartbeat_interval_seconds(this, "nodeops_heartbeat_interval_seconds", liveness::LiveUpdate, value_status::Used, 10, "Period of heartbeat ticks in node operations")
|
||||
, cache_index_pages(this, "cache_index_pages", liveness::LiveUpdate, value_status::Used, false,
|
||||
"Keep SSTable index pages in the global cache after a SSTable read. Expected to improve performance for workloads with big partitions, but may degrade performance for workloads with small partitions.")
|
||||
, x_log2_compaction_groups(this, "x_log2_compaction_groups", value_status::Used, 0, "Controls static number of compaction groups per table per shard. For X groups, set the option to log (base 2) of X. Example: Value of 3 implies 8 groups.")
|
||||
, consistent_cluster_management(this, "consistent_cluster_management", value_status::Used, true, "Use RAFT for cluster management and DDL")
|
||||
, wasm_cache_memory_fraction(this, "wasm_cache_memory_fraction", value_status::Used, 0.01, "Maximum total size of all WASM instances stored in the cache as fraction of total shard memory")
|
||||
, wasm_cache_timeout_in_ms(this, "wasm_cache_timeout_in_ms", value_status::Used, 5000, "Time after which an instance is evicted from the cache")
|
||||
|
||||
@@ -427,8 +427,6 @@ public:
|
||||
|
||||
named_value<bool> cache_index_pages;
|
||||
|
||||
named_value<unsigned> x_log2_compaction_groups;
|
||||
|
||||
named_value<bool> consistent_cluster_management;
|
||||
|
||||
named_value<double> wasm_cache_memory_fraction;
|
||||
|
||||
@@ -145,7 +145,4 @@ public:
|
||||
virtual size_t log2_compaction_groups() const = 0;
|
||||
};
|
||||
|
||||
// Used by the tests to increase the default number of compaction groups by increasing the minimum to X.
|
||||
void set_minimum_x_log2_compaction_groups(unsigned x_log2_compaction_groups);
|
||||
|
||||
}
|
||||
|
||||
@@ -1379,7 +1379,6 @@ keyspace::make_column_family_config(const schema& s, const database& db) const {
|
||||
cfg.view_update_concurrency_semaphore = _config.view_update_concurrency_semaphore;
|
||||
cfg.view_update_concurrency_semaphore_limit = _config.view_update_concurrency_semaphore_limit;
|
||||
cfg.data_listeners = &db.data_listeners();
|
||||
cfg.x_log2_compaction_groups = db_config.x_log2_compaction_groups();
|
||||
cfg.enable_compacting_data_for_streaming_and_repair = db_config.enable_compacting_data_for_streaming_and_repair();
|
||||
|
||||
return cfg;
|
||||
|
||||
@@ -1614,12 +1614,6 @@ void compaction_group::clear_sstables() {
|
||||
_maintenance_sstables = _t.make_maintenance_sstable_set();
|
||||
}
|
||||
|
||||
static std::atomic<unsigned> minimum_x_log2_compaction_groups{0};
|
||||
|
||||
void set_minimum_x_log2_compaction_groups(unsigned x_log2_compaction_groups) {
|
||||
minimum_x_log2_compaction_groups.store(x_log2_compaction_groups, std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
table::table(schema_ptr schema, config config, lw_shared_ptr<const storage_options> sopts, db::commitlog* cl, compaction_manager& compaction_manager,
|
||||
sstables::sstables_manager& sst_manager, cell_locker_stats& cl_stats, cache_tracker& row_cache_tracker,
|
||||
locator::effective_replication_map_ptr erm)
|
||||
|
||||
2
test.py
2
test.py
@@ -375,8 +375,6 @@ class PythonTestSuite(TestSuite):
|
||||
if type(cmdline_options) == str:
|
||||
cmdline_options = [cmdline_options]
|
||||
cmdline_options = merge_cmdline_options(cmdline_options, create_cfg.cmdline_from_test)
|
||||
if options.x_log2_compaction_groups:
|
||||
cmdline_options = merge_cmdline_options(cmdline_options, [ '--x-log2-compaction-groups={}'.format(options.x_log2_compaction_groups) ])
|
||||
|
||||
# There are multiple sources of config options, with increasing priority
|
||||
# (if two sources provide the same config option, the higher priority one wins):
|
||||
|
||||
@@ -81,12 +81,12 @@ future<> do_with_cql_env_and_compaction_groups_cgs(unsigned cgs, std::function<v
|
||||
co_await recursive_remove_directory(fs::path(cfg.db_config->data_file_directories()[0]));
|
||||
co_await recursive_touch_directory(cfg.db_config->data_file_directories()[0]);
|
||||
}
|
||||
cfg.db_config->x_log2_compaction_groups(cgs);
|
||||
// TODO: perhaps map log2_compaction_groups into initial_tablets when creating the testing keyspace.
|
||||
co_await do_with_cql_env_thread(func, cfg, thread_attr);
|
||||
}
|
||||
|
||||
future<> do_with_cql_env_and_compaction_groups(std::function<void(cql_test_env&)> func, cql_test_config cfg = {}, thread_attributes thread_attr = {}) {
|
||||
std::vector<unsigned> x_log2_compaction_group_values = { 0 /* 1 CG */, 1 /* 2 CGs */ };
|
||||
std::vector<unsigned> x_log2_compaction_group_values = { 0 /* 1 CG */ };
|
||||
for (auto x_log2_compaction_groups : x_log2_compaction_group_values) {
|
||||
co_await do_with_cql_env_and_compaction_groups_cgs(x_log2_compaction_groups, func, cfg, thread_attr);
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ std::pair<int, char**> scylla_tests_cmdline_options_processor::process_cmdline_o
|
||||
unsigned x_log2_compaction_groups = vm["x-log2-compaction-groups"].as<unsigned>();
|
||||
if (x_log2_compaction_groups) {
|
||||
std::cout << "Setting x_log2_compaction_groups to " << x_log2_compaction_groups << std::endl;
|
||||
replica::set_minimum_x_log2_compaction_groups(x_log2_compaction_groups);
|
||||
// TODO: perhaps we can later map it into initial_tablets.
|
||||
auto [_new_argc, _new_argv] = rebuild_arg_list_without(argc, argv, "--x-log2-compaction-groups", true);
|
||||
return std::make_pair(_new_argc, _new_argv);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user