Skip to content

Commit b0b29ed

Browse files
Pavel Emelyanov' via ScyllaDB developmentavikivity
Pavel Emelyanov' via ScyllaDB development
authored andcommitted
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 <[email protected]> Message-Id: <[email protected]>
1 parent cf289ad commit b0b29ed

File tree

3 files changed

+1
-15
lines changed

3 files changed

+1
-15
lines changed

main.cc

+1-4
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,7 @@ To start the scylla server proper, simply invoke as: scylla server (or just scyl
960960
// Iteration through column family directory for sstable loading is
961961
// done only by shard 0, so we'll no longer face race conditions as
962962
// described here: https://github.com/scylladb/scylla/issues/1014
963+
supervisor::notify("loading system sstables");
963964
replica::distributed_loader::init_system_keyspace(db, ss, gossiper, *cfg).get();
964965

965966
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
10571058
// schema migration, if needed, is also done on shard 0
10581059
db::legacy_schema_migrator::migrate(proxy, db, qp.local()).get();
10591060

1060-
supervisor::notify("loading system sstables");
1061-
1062-
replica::distributed_loader::ensure_system_table_directories(db).get();
1063-
10641061
// making compaction manager api available, after system keyspace has already been established.
10651062
api::set_server_compaction_manager(ctx).get();
10661063

replica/distributed_loader.cc

-10
Original file line numberDiff line numberDiff line change
@@ -599,16 +599,6 @@ future<> distributed_loader::init_system_keyspace(distributed<replica::database>
599599
});
600600
}
601601

602-
future<> distributed_loader::ensure_system_table_directories(distributed<replica::database>& db) {
603-
return parallel_for_each(system_keyspaces, [&db](std::string_view ksname) {
604-
auto& ks = db.local().find_keyspace(ksname);
605-
return parallel_for_each(ks.metadata()->cf_meta_data(), [&ks] (auto& pair) {
606-
auto cfm = pair.second;
607-
return ks.make_directory_for_column_family(cfm->cf_name(), cfm->id());
608-
});
609-
});
610-
}
611-
612602
future<> distributed_loader::init_non_system_keyspaces(distributed<replica::database>& db,
613603
distributed<service::storage_proxy>& proxy, sharded<db::system_keyspace>& sys_ks) {
614604
return seastar::async([&db, &proxy, &sys_ks] {

replica/distributed_loader.hh

-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ class distributed_loader {
7979
public:
8080
static future<> init_system_keyspace(distributed<replica::database>& db, distributed<service::storage_service>& ss, sharded<gms::gossiper>& g, db::config& cfg);
8181
static future<> init_non_system_keyspaces(distributed<replica::database>& db, distributed<service::storage_proxy>& proxy, sharded<db::system_keyspace>& sys_ks);
82-
static future<> ensure_system_table_directories(distributed<replica::database>& db);
8382

8483
// Scan sstables under upload directory. Return a vector with smp::count entries.
8584
// Each entry with index of idx should be accessed on shard idx only.

0 commit comments

Comments
 (0)