diff --git a/cql3/statements/describe_statement.cc b/cql3/statements/describe_statement.cc index 6fff9f67eb..588387d131 100644 --- a/cql3/statements/describe_statement.cc +++ b/cql3/statements/describe_statement.cc @@ -488,7 +488,7 @@ bool cluster_describe_statement::should_add_range_ownership(replica::database& d //TODO: produce range ownership for tables using tablets too bool uses_tablets = false; try { - uses_tablets = !ks.empty() && db.find_keyspace(ks).get_replication_strategy().uses_tablets(); + uses_tablets = !ks.empty() && db.find_keyspace(ks).uses_tablets(); } catch (const data_dictionary::no_such_keyspace&) { // ignore } diff --git a/db/view/view.cc b/db/view/view.cc index ca30789648..42ee3bac70 100644 --- a/db/view/view.cc +++ b/db/view/view.cc @@ -1710,7 +1710,7 @@ future<> view_update_generator::mutate_MV( // are more frequent and backward compatibility is less important. // TODO: Maybe allow users to set use_legacy_self_pairing explicitly // on a view, like we have the synchronous_updates_flag. - bool use_legacy_self_pairing = !ks.get_replication_strategy().uses_tablets(); + bool use_legacy_self_pairing = !ks.uses_tablets(); auto target_endpoint = get_view_natural_endpoint(base_ermp, view_ermp, network_topology, base_token, view_token, use_legacy_self_pairing); auto remote_endpoints = view_ermp->get_pending_endpoints(view_token); auto sem_units = pending_view_updates.split(mut.fm.representation().size()); diff --git a/replica/database.hh b/replica/database.hh index 30fe2e2709..adb7fd3205 100644 --- a/replica/database.hh +++ b/replica/database.hh @@ -1318,6 +1318,10 @@ public: locator::vnode_effective_replication_map_ptr get_vnode_effective_replication_map() const; + bool uses_tablets() const { + return _replication_strategy->uses_tablets(); + } + column_family::config make_column_family_config(const schema& s, const database& db) const; void add_or_update_column_family(const schema_ptr& s); void add_user_type(const user_type ut); diff --git a/service/storage_service.cc b/service/storage_service.cc index cc3a6db0f9..7f8ae0632c 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -4635,7 +4635,7 @@ future<> storage_service::move(token new_token) { future> storage_service::describe_ring(const sstring& keyspace, bool include_only_local_dc) const { - if (_db.local().find_keyspace(keyspace).get_replication_strategy().uses_tablets()) { + if (_db.local().find_keyspace(keyspace).uses_tablets()) { throw std::runtime_error(fmt::format("The keyspace {} has tablet table. Query describe_ring with the table parameter!", keyspace)); } co_return co_await locator::describe_ring(_db.local(), _gossiper, keyspace, include_only_local_dc);