view_info: Drop calls to get_local_storage_proxy()
In both cases the proxy is called to get data_dictionary from. Now its available as the call argument. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
@@ -85,7 +85,7 @@ cql3::statements::select_statement& view_info::select_statement(data_dictionary:
|
|||||||
// FIXME(sarna): legacy code, should be removed after "computed_columns" feature is guaranteed
|
// FIXME(sarna): legacy code, should be removed after "computed_columns" feature is guaranteed
|
||||||
// to be available on every node. Then, we won't need to check if this view is backing a secondary index.
|
// to be available on every node. Then, we won't need to check if this view is backing a secondary index.
|
||||||
const column_definition* legacy_token_column = nullptr;
|
const column_definition* legacy_token_column = nullptr;
|
||||||
if (service::get_local_storage_proxy().local_db().find_column_family(base_id()).get_index_manager().is_global_index(_schema)) {
|
if (db.find_column_family(base_id()).get_index_manager().is_global_index(_schema)) {
|
||||||
if (!_schema.clustering_key_columns().empty()) {
|
if (!_schema.clustering_key_columns().empty()) {
|
||||||
legacy_token_column = &_schema.clustering_key_columns().front();
|
legacy_token_column = &_schema.clustering_key_columns().front();
|
||||||
}
|
}
|
||||||
@@ -103,7 +103,7 @@ cql3::statements::select_statement& view_info::select_statement(data_dictionary:
|
|||||||
raw->prepare_keyspace(_schema.ks_name());
|
raw->prepare_keyspace(_schema.ks_name());
|
||||||
raw->set_bound_variables({});
|
raw->set_bound_variables({});
|
||||||
cql3::cql_stats ignored;
|
cql3::cql_stats ignored;
|
||||||
auto prepared = raw->prepare(service::get_local_storage_proxy().data_dictionary(), ignored, true);
|
auto prepared = raw->prepare(db, ignored, true);
|
||||||
_select_statement = static_pointer_cast<cql3::statements::select_statement>(prepared->statement);
|
_select_statement = static_pointer_cast<cql3::statements::select_statement>(prepared->statement);
|
||||||
}
|
}
|
||||||
return *_select_statement;
|
return *_select_statement;
|
||||||
|
|||||||
Reference in New Issue
Block a user