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>