diff --git a/db/system_distributed_keyspace.hh b/db/system_distributed_keyspace.hh index c21ad398c1..4e07fcd619 100644 --- a/db/system_distributed_keyspace.hh +++ b/db/system_distributed_keyspace.hh @@ -39,13 +39,6 @@ public: static constexpr auto VIEW_BUILD_STATUS = "view_build_status"; - /* Nodes use this table to communicate new CDC stream generations to other nodes. */ - static constexpr auto CDC_TOPOLOGY_DESCRIPTION = "cdc_generation_descriptions"; - - /* Nodes use this table to communicate new CDC stream generations to other nodes. - * Resides in system_distributed_everywhere. */ - static constexpr auto CDC_GENERATIONS_V2 = "cdc_generation_descriptions_v2"; - /* This table is used by CDC clients to learn about available CDC streams. */ static constexpr auto CDC_DESC_V2 = "cdc_streams_descriptions_v2"; diff --git a/service/client_state.cc b/service/client_state.cc index 30cc254ef0..667d6eb163 100644 --- a/service/client_state.cc +++ b/service/client_state.cc @@ -124,9 +124,7 @@ future<> service::client_state::check_internal_table_permissions(std::string_vie if (forbidden_permissions.contains(cmd.permission)) { if ((ks == db::system_distributed_keyspace::NAME || ks == db::system_distributed_keyspace::NAME_EVERYWHERE) && (table_name == db::system_distributed_keyspace::CDC_DESC_V2 - || table_name == db::system_distributed_keyspace::CDC_TOPOLOGY_DESCRIPTION - || table_name == db::system_distributed_keyspace::CDC_TIMESTAMPS - || table_name == db::system_distributed_keyspace::CDC_GENERATIONS_V2)) { + || table_name == db::system_distributed_keyspace::CDC_TIMESTAMPS)) { return make_exception_future(exceptions::unauthorized_exception( format("Cannot {} {}", auth::permissions::to_string(cmd.permission), cmd.resource))); } diff --git a/test/boost/cdc_test.cc b/test/boost/cdc_test.cc index d11075f9fc..e8c175a831 100644 --- a/test/boost/cdc_test.cc +++ b/test/boost/cdc_test.cc @@ -297,11 +297,10 @@ SEASTAR_THREAD_TEST_CASE(test_permissions_of_cdc_description) { BOOST_REQUIRE_THROW(e.execute_cql(stmt).get(), exceptions::unauthorized_exception); }; - const std::string generations_v2 = "system_distributed_everywhere.cdc_generation_descriptions_v2"; const std::string streams = "system_distributed.cdc_streams_descriptions_v2"; const std::string timestamps = "system_distributed.cdc_generation_timestamps"; - for (auto& t : {generations_v2, streams, timestamps}) { + for (auto& t : {streams, timestamps}) { auto dot_pos = t.find_first_of('.'); SCYLLA_ASSERT(dot_pos != std::string_view::npos && dot_pos != 0 && dot_pos != t.size() - 1); BOOST_REQUIRE(e.local_db().has_schema(t.substr(0, dot_pos), t.substr(dot_pos + 1))); @@ -317,18 +316,15 @@ SEASTAR_THREAD_TEST_CASE(test_permissions_of_cdc_description) { for (auto& t : {streams}) { assert_unauthorized(seastar::format("ALTER TABLE {} ALTER time TYPE blob", t)); } - assert_unauthorized(seastar::format("ALTER TABLE {} ALTER id TYPE blob", generations_v2)); assert_unauthorized(seastar::format("ALTER TABLE {} ALTER key TYPE blob", timestamps)); // Allow DELETE for (auto& t : {streams}) { e.execute_cql(seastar::format("DELETE FROM {} WHERE time = toTimeStamp(now())", t)).get(); } - e.execute_cql(seastar::format("DELETE FROM {} WHERE id = uuid()", generations_v2)).get(); e.execute_cql(seastar::format("DELETE FROM {} WHERE key = 'timestamps'", timestamps)).get(); // Allow UPDATE, INSERT - e.execute_cql(seastar::format("INSERT INTO {} (id, range_end) VALUES (uuid(), 0)", generations_v2)).get(); e.execute_cql(seastar::format("INSERT INTO {} (time, range_end) VALUES (toTimeStamp(now()), 0)", streams)).get(); e.execute_cql(seastar::format("UPDATE {} SET expired = toTimeStamp(now()) WHERE key = 'timestamps' AND time = toTimeStamp(now())", timestamps)).get(); }).get();