keyspace_metadata: Add default value for new_keyspace's durable_writes
Almost all callers call new_keyspace with durable writes ON, so it's worth having default value for it Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
@@ -4534,7 +4534,7 @@ static lw_shared_ptr<keyspace_metadata> create_keyspace_metadata(std::string_vie
|
||||
initial_tablets = std::stol(tags_map.at(INITIAL_TABLETS_TAG_KEY));
|
||||
}
|
||||
|
||||
return keyspace_metadata::new_keyspace(keyspace_name, "org.apache.cassandra.locator.NetworkTopologyStrategy", std::move(opts), initial_tablets, true);
|
||||
return keyspace_metadata::new_keyspace(keyspace_name, "org.apache.cassandra.locator.NetworkTopologyStrategy", std::move(opts), initial_tablets);
|
||||
}
|
||||
|
||||
future<> executor::start() {
|
||||
|
||||
@@ -180,8 +180,7 @@ future<> service::create_keyspace_if_missing(::service::migration_manager& mm) c
|
||||
meta::AUTH_KS,
|
||||
"org.apache.cassandra.locator.SimpleStrategy",
|
||||
opts,
|
||||
std::nullopt,
|
||||
true);
|
||||
std::nullopt);
|
||||
|
||||
try {
|
||||
co_return co_await mm.announce(::service::prepare_new_keyspace_announcement(db.real_database(), ksm, ts),
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
std::string_view strategy_name,
|
||||
locator::replication_strategy_config_options options,
|
||||
std::optional<unsigned> initial_tablets,
|
||||
bool durables_writes,
|
||||
bool durables_writes = true,
|
||||
std::vector<schema_ptr> cf_defs = std::vector<schema_ptr>{},
|
||||
storage_options storage_opts = {});
|
||||
static lw_shared_ptr<keyspace_metadata>
|
||||
|
||||
@@ -265,8 +265,7 @@ future<> system_distributed_keyspace::start() {
|
||||
NAME,
|
||||
"org.apache.cassandra.locator.SimpleStrategy",
|
||||
{{"replication_factor", "3"}},
|
||||
std::nullopt,
|
||||
true /* durable_writes */);
|
||||
std::nullopt);
|
||||
if (!db.has_keyspace(NAME)) {
|
||||
mutations = service::prepare_new_keyspace_announcement(db.real_database(), sd_ksm, ts);
|
||||
description += format(" create {} keyspace;", NAME);
|
||||
@@ -278,8 +277,7 @@ future<> system_distributed_keyspace::start() {
|
||||
NAME_EVERYWHERE,
|
||||
"org.apache.cassandra.locator.EverywhereStrategy",
|
||||
{},
|
||||
std::nullopt,
|
||||
true /* durable_writes */);
|
||||
std::nullopt);
|
||||
if (!db.has_keyspace(NAME_EVERYWHERE)) {
|
||||
auto sde_mutations = service::prepare_new_keyspace_announcement(db.real_database(), sde_ksm, ts);
|
||||
std::move(sde_mutations.begin(), sde_mutations.end(), std::back_inserter(mutations));
|
||||
|
||||
@@ -145,7 +145,7 @@ future<> table_helper::setup_keyspace(cql3::query_processor& qp, service::migrat
|
||||
|
||||
std::map<sstring, sstring> opts;
|
||||
opts["replication_factor"] = replication_factor;
|
||||
auto ksm = keyspace_metadata::new_keyspace(keyspace_name, "org.apache.cassandra.locator.SimpleStrategy", std::move(opts), std::nullopt, true);
|
||||
auto ksm = keyspace_metadata::new_keyspace(keyspace_name, "org.apache.cassandra.locator.SimpleStrategy", std::move(opts), std::nullopt);
|
||||
|
||||
while (!db.has_keyspace(keyspace_name)) {
|
||||
auto group0_guard = co_await mm.start_group0_operation();
|
||||
|
||||
Reference in New Issue
Block a user