distributed-loader: Remove ensure_system_table_directories
It looks like the exactly same code is called few steps above via
distributed_loader::init_system_keyspace
`- distributed_loader::populate_keyspace
While at it -- move the supervisor::notify("loading system sstables")
handing around in the more suitable location.
tests: https://jenkins.scylladb.com/job/releng/job/Scylla-CI/981/
Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
Message-Id: <20220621165313.31284-1-xemul@scylladb.com>
This commit is contained in:
committed by
Avi Kivity
parent
cf289ad538
commit
b0b29edcd7
5
main.cc
5
main.cc
@@ -960,6 +960,7 @@ To start the scylla server proper, simply invoke as: scylla server (or just scyl
|
||||
// Iteration through column family directory for sstable loading is
|
||||
// done only by shard 0, so we'll no longer face race conditions as
|
||||
// described here: https://github.com/scylladb/scylla/issues/1014
|
||||
supervisor::notify("loading system sstables");
|
||||
replica::distributed_loader::init_system_keyspace(db, ss, gossiper, *cfg).get();
|
||||
|
||||
smp::invoke_on_all([blocked_reactor_notify_ms] {
|
||||
@@ -1057,10 +1058,6 @@ To start the scylla server proper, simply invoke as: scylla server (or just scyl
|
||||
// schema migration, if needed, is also done on shard 0
|
||||
db::legacy_schema_migrator::migrate(proxy, db, qp.local()).get();
|
||||
|
||||
supervisor::notify("loading system sstables");
|
||||
|
||||
replica::distributed_loader::ensure_system_table_directories(db).get();
|
||||
|
||||
// making compaction manager api available, after system keyspace has already been established.
|
||||
api::set_server_compaction_manager(ctx).get();
|
||||
|
||||
|
||||
@@ -599,16 +599,6 @@ future<> distributed_loader::init_system_keyspace(distributed<replica::database>
|
||||
});
|
||||
}
|
||||
|
||||
future<> distributed_loader::ensure_system_table_directories(distributed<replica::database>& db) {
|
||||
return parallel_for_each(system_keyspaces, [&db](std::string_view ksname) {
|
||||
auto& ks = db.local().find_keyspace(ksname);
|
||||
return parallel_for_each(ks.metadata()->cf_meta_data(), [&ks] (auto& pair) {
|
||||
auto cfm = pair.second;
|
||||
return ks.make_directory_for_column_family(cfm->cf_name(), cfm->id());
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
future<> distributed_loader::init_non_system_keyspaces(distributed<replica::database>& db,
|
||||
distributed<service::storage_proxy>& proxy, sharded<db::system_keyspace>& sys_ks) {
|
||||
return seastar::async([&db, &proxy, &sys_ks] {
|
||||
|
||||
@@ -79,7 +79,6 @@ class distributed_loader {
|
||||
public:
|
||||
static future<> init_system_keyspace(distributed<replica::database>& db, distributed<service::storage_service>& ss, sharded<gms::gossiper>& g, db::config& cfg);
|
||||
static future<> init_non_system_keyspaces(distributed<replica::database>& db, distributed<service::storage_proxy>& proxy, sharded<db::system_keyspace>& sys_ks);
|
||||
static future<> ensure_system_table_directories(distributed<replica::database>& db);
|
||||
|
||||
// Scan sstables under upload directory. Return a vector with smp::count entries.
|
||||
// Each entry with index of idx should be accessed on shard idx only.
|
||||
|
||||
Reference in New Issue
Block a user