/* * Copyright (C) 2017-present ScyllaDB */ /* * SPDX-License-Identifier: AGPL-3.0-or-later */ #pragma once #include #include #include #include #include #include #include #include #include #include "log.hh" #include "seastarx.hh" #include "utils/exponential_backoff_retry.hh" #include "service/query_state.hh" using namespace std::chrono_literals; namespace replica { class database; } class timeout_config; namespace service { class migration_manager; } namespace cql3 { class query_processor; } namespace auth { namespace meta { constexpr std::string_view DEFAULT_SUPERUSER_NAME("cassandra"); extern constinit const std::string_view AUTH_KS; extern constinit const std::string_view USERS_CF; extern constinit const std::string_view AUTH_PACKAGE_NAME; } template future<> once_among_shards(Task&& f) { if (this_shard_id() == 0u) { return f(); } return make_ready_future<>(); } // Func must support being invoked more than once. future<> do_after_system_ready(seastar::abort_source& as, seastar::noncopyable_function()> func); future<> create_metadata_table_if_missing( std::string_view table_name, cql3::query_processor&, std::string_view cql, ::service::migration_manager&) noexcept; future<> wait_for_schema_agreement(::service::migration_manager&, const replica::database&, seastar::abort_source&); /// /// Time-outs for internal, non-local CQL queries. /// ::service::query_state& internal_distributed_query_state() noexcept; }