config: Add --tablets-initial-scale-factor
Previous patch taught tablets allocator to multiply the initial tablets count by some value. This patch makes this factor configurable Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
@@ -1125,6 +1125,7 @@ db::config::config(std::shared_ptr<db::extensions> exts)
|
|||||||
, minimum_replication_factor_warn_threshold(this, "minimum_replication_factor_warn_threshold", liveness::LiveUpdate, value_status::Used, 3, "")
|
, minimum_replication_factor_warn_threshold(this, "minimum_replication_factor_warn_threshold", liveness::LiveUpdate, value_status::Used, 3, "")
|
||||||
, maximum_replication_factor_warn_threshold(this, "maximum_replication_factor_warn_threshold", liveness::LiveUpdate, value_status::Used, -1, "")
|
, maximum_replication_factor_warn_threshold(this, "maximum_replication_factor_warn_threshold", liveness::LiveUpdate, value_status::Used, -1, "")
|
||||||
, maximum_replication_factor_fail_threshold(this, "maximum_replication_factor_fail_threshold", liveness::LiveUpdate, value_status::Used, -1, "")
|
, maximum_replication_factor_fail_threshold(this, "maximum_replication_factor_fail_threshold", liveness::LiveUpdate, value_status::Used, -1, "")
|
||||||
|
, tablets_initial_scale_factor(this, "tablets_initial_scale_factor", value_status::Used, 1, "Calculated initial tablets are multiplied by this number")
|
||||||
, replication_strategy_warn_list(this, "replication_strategy_warn_list", liveness::LiveUpdate, value_status::Used, {locator::replication_strategy_type::simple}, "Controls which replication strategies to warn about when creating/altering a keyspace. Doesn't affect the pre-existing keyspaces.")
|
, replication_strategy_warn_list(this, "replication_strategy_warn_list", liveness::LiveUpdate, value_status::Used, {locator::replication_strategy_type::simple}, "Controls which replication strategies to warn about when creating/altering a keyspace. Doesn't affect the pre-existing keyspaces.")
|
||||||
, replication_strategy_fail_list(this, "replication_strategy_fail_list", liveness::LiveUpdate, value_status::Used, {}, "Controls which replication strategies are disallowed to be used when creating/altering a keyspace. Doesn't affect the pre-existing keyspaces.")
|
, replication_strategy_fail_list(this, "replication_strategy_fail_list", liveness::LiveUpdate, value_status::Used, {}, "Controls which replication strategies are disallowed to be used when creating/altering a keyspace. Doesn't affect the pre-existing keyspaces.")
|
||||||
, service_levels_interval(this, "service_levels_interval_ms", liveness::LiveUpdate, value_status::Used, 10000, "Controls how often service levels module polls configuration table")
|
, service_levels_interval(this, "service_levels_interval_ms", liveness::LiveUpdate, value_status::Used, 10000, "Controls how often service levels module polls configuration table")
|
||||||
|
|||||||
@@ -465,6 +465,7 @@ public:
|
|||||||
named_value<int> minimum_replication_factor_warn_threshold;
|
named_value<int> minimum_replication_factor_warn_threshold;
|
||||||
named_value<int> maximum_replication_factor_warn_threshold;
|
named_value<int> maximum_replication_factor_warn_threshold;
|
||||||
named_value<int> maximum_replication_factor_fail_threshold;
|
named_value<int> maximum_replication_factor_fail_threshold;
|
||||||
|
named_value<int> tablets_initial_scale_factor;
|
||||||
named_value<std::vector<enum_option<replication_strategy_restriction_t>>> replication_strategy_warn_list;
|
named_value<std::vector<enum_option<replication_strategy_restriction_t>>> replication_strategy_warn_list;
|
||||||
named_value<std::vector<enum_option<replication_strategy_restriction_t>>> replication_strategy_fail_list;
|
named_value<std::vector<enum_option<replication_strategy_restriction_t>>> replication_strategy_fail_list;
|
||||||
|
|
||||||
|
|||||||
1
main.cc
1
main.cc
@@ -1364,6 +1364,7 @@ To start the scylla server proper, simply invoke as: scylla server (or just scyl
|
|||||||
gossiper.local(), feature_service.local(), sys_ks.local(), group0_client};
|
gossiper.local(), feature_service.local(), sys_ks.local(), group0_client};
|
||||||
|
|
||||||
service::tablet_allocator::config tacfg;
|
service::tablet_allocator::config tacfg;
|
||||||
|
tacfg.initial_tablets_scale = cfg->tablets_initial_scale_factor();
|
||||||
distributed<service::tablet_allocator> tablet_allocator;
|
distributed<service::tablet_allocator> tablet_allocator;
|
||||||
if (cfg->check_experimental(db::experimental_features_t::feature::TABLETS) &&
|
if (cfg->check_experimental(db::experimental_features_t::feature::TABLETS) &&
|
||||||
!cfg->check_experimental(db::experimental_features_t::feature::CONSISTENT_TOPOLOGY_CHANGES)) {
|
!cfg->check_experimental(db::experimental_features_t::feature::CONSISTENT_TOPOLOGY_CHANGES)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user