mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-03 13:37:04 +00:00
db/schema_tables: Fix create keyspace notification
We need to send out the notification for all created keyspaces, not just for the first one. Spotted during code inspection. Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
This commit is contained in:
@@ -623,12 +623,13 @@ future<> save_system_keyspace_schema() {
|
||||
// FIXME: clean this up by reorganizing the code
|
||||
// Send CQL events only once, not once per shard.
|
||||
if (engine().cpu_id() == 0) {
|
||||
for (auto&& partition : created) {
|
||||
return do_for_each(created, [] (auto&& partition) {
|
||||
auto ksm = create_keyspace_from_schema_partition(partition);
|
||||
return service::migration_manager::notify_create_keyspace(ksm);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return make_ready_future<>();
|
||||
}
|
||||
return make_ready_future<>();
|
||||
});
|
||||
}).then([dropped = std::move(dropped)] () {
|
||||
return make_ready_future<std::set<sstring>>(dropped);
|
||||
|
||||
Reference in New Issue
Block a user