diff --git a/db/system_keyspace.cc b/db/system_keyspace.cc index be71e67dff..53fe87c163 100644 --- a/db/system_keyspace.cc +++ b/db/system_keyspace.cc @@ -62,6 +62,7 @@ #include "query_context.hh" #include "partition_slice_builder.hh" #include "db/config.hh" +#include "system_keyspace_view_types.hh" #include "schema_builder.hh" #include "md5_hasher.hh" #include "release.hh" diff --git a/db/system_keyspace.hh b/db/system_keyspace.hh index 0104b68f6e..2844b7b7b9 100644 --- a/db/system_keyspace.hh +++ b/db/system_keyspace.hh @@ -127,12 +127,7 @@ struct range_estimates { }; using view_name = std::pair; -struct view_build_progress { - view_name view; - dht::token first_token; - std::optional next_token; - shard_id cpu_id; -}; +struct view_build_progress; extern schema_ptr hints(); extern schema_ptr batchlog(); diff --git a/db/system_keyspace_view_types.hh b/db/system_keyspace_view_types.hh new file mode 100644 index 0000000000..60e7fde4dd --- /dev/null +++ b/db/system_keyspace_view_types.hh @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2018 ScyllaDB + */ + +/* + * This file is part of Scylla. + * + * Scylla is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Scylla is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Scylla. If not, see . + */ + +#pragma once + +#include +#include +#include +#include +#include "seastarx.hh" + +namespace dht { + +class token; + +} + +namespace db::system_keyspace { + +using view_name = std::pair; + +struct view_build_progress { + view_name view; + dht::token first_token; + std::optional next_token; + shard_id cpu_id; +}; + +} diff --git a/db/view/view.cc b/db/view/view.cc index ddf296ba8b..0ecf6cb8a1 100644 --- a/db/view/view.cc +++ b/db/view/view.cc @@ -58,6 +58,8 @@ #include "cql3/util.hh" #include "db/view/view.hh" #include "db/view/view_builder.hh" +#include "db/system_keyspace_view_types.hh" +#include "db/system_keyspace.hh" #include "frozen_mutation.hh" #include "gms/inet_address.hh" #include "keys.hh" diff --git a/db/view/view_builder.hh b/db/view/view_builder.hh index 3a262da853..5ded1ea09f 100644 --- a/db/view/view_builder.hh +++ b/db/view/view_builder.hh @@ -22,7 +22,6 @@ #pragma once #include "database_fwd.hh" -#include "db/system_keyspace.hh" #include "db/system_distributed_keyspace.hh" #include "dht/i_partitioner.hh" #include "keys.hh" @@ -46,6 +45,14 @@ #include #include +namespace db::system_keyspace { + +using view_name = std::pair; +class view_build_progress; + +} + + namespace db::view { /**