mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-31 03:56:42 +00:00
this change should keep the timeout settings of handler_factory sync'ed with the ones used by `thrift_server`. so far, the `timeout_config` instance in `thrift_server` is not live-updateable, but in a follow-up change, we will make it so. so, this change prepares the handler_factory for a live-updateable timeout_config. instead keeping a snapshot of the timeout_config, keep a reference of it in handler_factory. the reference points to `thrift_server::_config`. so despite that `thrift_server::_handler_factory` is a shared_ptr, the member variable won't outlive its container, as the only reason to have it as a shared_ptr is to appease the ctor of `CassandraAsyncProcessorFactory`. and the constructed `_processor_factory` is also a member variable of `thrift_server`, so we won't take the risk of a dangling reference held by `handler_factory`. Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
28 lines
768 B
C++
28 lines
768 B
C++
/*
|
|
* Copyright (C) 2014-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
#ifndef APPS_SEASTAR_THRIFT_HANDLER_HH_
|
|
#define APPS_SEASTAR_THRIFT_HANDLER_HH_
|
|
|
|
#include "Cassandra.h"
|
|
#include "auth/service.hh"
|
|
#include "cql3/query_processor.hh"
|
|
#include <memory>
|
|
|
|
struct timeout_config;
|
|
class service_permit;
|
|
namespace service { class storage_service; }
|
|
|
|
namespace data_dictionary {
|
|
class database;
|
|
}
|
|
|
|
std::unique_ptr<::cassandra::CassandraCobSvIfFactory> create_handler_factory(data_dictionary::database db, distributed<cql3::query_processor>& qp, sharded<service::storage_service>& ss, sharded<service::storage_proxy>& proxy, auth::service&, const timeout_config&, service_permit& current_permit);
|
|
|
|
#endif /* APPS_SEASTAR_THRIFT_HANDLER_HH_ */
|