From 2d8b3e751bfb94bdf18ec737285d57ab5ddf3a98 Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Wed, 18 Mar 2026 16:48:42 +0200 Subject: [PATCH] view: drop unused v1 builder code --- db/system_distributed_keyspace.cc | 29 ----------------------------- db/system_distributed_keyspace.hh | 5 ----- 2 files changed, 34 deletions(-) diff --git a/db/system_distributed_keyspace.cc b/db/system_distributed_keyspace.cc index 98e6add946..b6a8ef52fc 100644 --- a/db/system_distributed_keyspace.cc +++ b/db/system_distributed_keyspace.cc @@ -355,35 +355,6 @@ static service::query_state& internal_distributed_query_state() { return qs; }; -future<> system_distributed_keyspace::start_view_build(sstring ks_name, sstring view_name) const { - auto host_id = _sp.local_db().get_token_metadata().get_my_id(); - return _qp.execute_internal( - format("INSERT INTO {}.{} (keyspace_name, view_name, host_id, status) VALUES (?, ?, ?, ?)", NAME, VIEW_BUILD_STATUS), - db::consistency_level::ONE, - internal_distributed_query_state(), - { std::move(ks_name), std::move(view_name), host_id.uuid(), "STARTED" }, - cql3::query_processor::cache_internal::no).discard_result(); -} - -future<> system_distributed_keyspace::finish_view_build(sstring ks_name, sstring view_name) const { - auto host_id = _sp.local_db().get_token_metadata().get_my_id(); - return _qp.execute_internal( - format("UPDATE {}.{} SET status = ? WHERE keyspace_name = ? AND view_name = ? AND host_id = ?", NAME, VIEW_BUILD_STATUS), - db::consistency_level::ONE, - internal_distributed_query_state(), - { "SUCCESS", std::move(ks_name), std::move(view_name), host_id.uuid() }, - cql3::query_processor::cache_internal::no).discard_result(); -} - -future<> system_distributed_keyspace::remove_view(sstring ks_name, sstring view_name) const { - return _qp.execute_internal( - format("DELETE FROM {}.{} WHERE keyspace_name = ? AND view_name = ?", NAME, VIEW_BUILD_STATUS), - db::consistency_level::ONE, - internal_distributed_query_state(), - { std::move(ks_name), std::move(view_name) }, - cql3::query_processor::cache_internal::no).discard_result(); -} - /* We want to make sure that writes/reads to/from CDC management-related distributed tables * are consistent: a read following an acknowledged write to the same partition should contact * at least one of the replicas that the write contacted. diff --git a/db/system_distributed_keyspace.hh b/db/system_distributed_keyspace.hh index 9609cab3ab..17caefa246 100644 --- a/db/system_distributed_keyspace.hh +++ b/db/system_distributed_keyspace.hh @@ -87,11 +87,6 @@ public: bool started() const { return _started; } - future> view_status(sstring ks_name, sstring view_name) const; - future<> start_view_build(sstring ks_name, sstring view_name) const; - future<> finish_view_build(sstring ks_name, sstring view_name) const; - future<> remove_view(sstring ks_name, sstring view_name) const; - future<> insert_cdc_generation(utils::UUID, const cdc::topology_description&, context); future> read_cdc_generation(utils::UUID);