mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-02 14:15:46 +00:00
add a way to negotiate generation of the tablet info for drivers
Tablets metadata is quite expensive to generate (each data_value is an allocation), so an old driver (without support for tablets) will generate huge amounts of such notifications. This commit adds a way to negotiate generation of the notification: a new driver will ask for them, and an old driver won't get them. It uses the OPTIONS/SUPPORTED/STARTUP protocol described in native_protocol_v4.spec. Closes scylladb/scylladb#16611
This commit is contained in:
committed by
Avi Kivity
parent
2508d33946
commit
91a5a41313
@@ -190,6 +190,9 @@ private:
|
||||
auto make_query_state() {
|
||||
if (_db.local().has_keyspace(ks_name)) {
|
||||
_core_local.local().client_state.set_keyspace(_db.local(), ks_name);
|
||||
cql_transport::cql_protocol_extension_enum_set cql_proto_exts;
|
||||
cql_proto_exts.set(cql_transport::cql_protocol_extension::TABLETS_ROUTING_V1);
|
||||
_core_local.local().client_state.set_protocol_extensions(std::move(cql_proto_exts));
|
||||
}
|
||||
return ::make_shared<service::query_state>(_core_local.local().client_state, empty_service_permit());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user