diff --git a/table_helper.cc b/table_helper.cc index 32daf5326b..9ac1bf9bc5 100644 --- a/table_helper.cc +++ b/table_helper.cc @@ -164,16 +164,16 @@ future<> table_helper::setup_keyspace(cql3::query_processor& qp, service::migrat qs.get_client_state().set_keyspace(db.real_database(), keyspace_name); while (std::any_of(tables.begin(), tables.end(), [db] (table_helper* t) { return !db.has_schema(t->_keyspace, t->_name); })) { - auto group0_guard = co_await mm.start_group0_operation(); - auto ts = group0_guard.write_timestamp(); - std::vector table_mutations; + auto group0_guard = co_await mm.start_group0_operation(); + auto ts = group0_guard.write_timestamp(); + std::vector table_mutations; - co_await coroutine::parallel_for_each(tables, [&] (auto&& table) -> future<> { - auto schema = parse_new_cf_statement(qp, table->_create_cql); - if (!db.has_schema(schema->ks_name(), schema->cf_name())) { - co_return co_await service::prepare_new_column_family_announcement(table_mutations, qp.proxy(), *ksm, schema, ts); - } - }); + co_await coroutine::parallel_for_each(tables, [&] (auto&& table) -> future<> { + auto schema = parse_new_cf_statement(qp, table->_create_cql); + if (!db.has_schema(schema->ks_name(), schema->cf_name())) { + co_return co_await service::prepare_new_column_family_announcement(table_mutations, qp.proxy(), *ksm, schema, ts); + } + }); if (table_mutations.empty()) { co_return;