hints: Remove snitch dependency
After previous patch hints manager class gets unused dependency on snitch. While removing it it turns out that several unrelated places get needed headers indirectly via host_filter.hh -> snitsh_base.hh inclusion. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#include "seastarx.hh"
|
||||
#include "utils/config_file.hh"
|
||||
#include "utils/enum_option.hh"
|
||||
#include "utils/UUID.hh"
|
||||
#include "gms/inet_address.hh"
|
||||
#include "db/hints/host_filter.hh"
|
||||
|
||||
namespace seastar {
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <string_view>
|
||||
|
||||
#include <seastar/core/sstring.hh>
|
||||
#include "locator/snitch_base.hh"
|
||||
#include "seastarx.hh"
|
||||
|
||||
namespace gms {
|
||||
|
||||
@@ -49,7 +49,6 @@ const std::chrono::seconds manager::hints_flush_period = std::chrono::seconds(10
|
||||
manager::manager(sstring hints_directory, host_filter filter, int64_t max_hint_window_ms, resource_manager& res_manager, distributed<replica::database>& db)
|
||||
: _hints_dir(fs::path(hints_directory) / format("{:d}", this_shard_id()))
|
||||
, _host_filter(std::move(filter))
|
||||
, _local_snitch_ptr(locator::i_endpoint_snitch::get_local_snitch_ptr())
|
||||
, _max_hint_window_us(max_hint_window_ms * 1000)
|
||||
, _local_db(db.local())
|
||||
, _resource_manager(res_manager)
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <seastar/core/lowres_clock.hh>
|
||||
#include <seastar/core/shared_mutex.hh>
|
||||
#include <seastar/core/abort_source.hh>
|
||||
#include "locator/snitch_base.hh"
|
||||
#include "inet_address_vectors.hh"
|
||||
#include "db/commitlog/commitlog.hh"
|
||||
#include "utils/loading_shared_values.hh"
|
||||
@@ -515,7 +514,6 @@ private:
|
||||
host_filter _host_filter;
|
||||
shared_ptr<service::storage_proxy> _proxy_anchor;
|
||||
shared_ptr<gms::gossiper> _gossiper_anchor;
|
||||
locator::snitch_ptr& _local_snitch_ptr;
|
||||
int64_t _max_hint_window_us = 0;
|
||||
replica::database& _local_db;
|
||||
|
||||
@@ -530,7 +528,7 @@ private:
|
||||
seastar::named_semaphore _drain_lock = {1, named_semaphore_exception_factory{"drain lock"}};
|
||||
|
||||
public:
|
||||
manager(sstring hints_directory, host_filter filter, int64_t max_hint_window_ms, resource_manager&res_manager, distributed<replica::database>& db);
|
||||
manager(sstring hints_directory, host_filter filter, int64_t max_hint_window_ms, resource_manager&res_manager, sharded<replica::database>& db);
|
||||
virtual ~manager();
|
||||
manager(manager&&) = delete;
|
||||
manager& operator=(manager&&) = delete;
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include "utils/generation-number.hh"
|
||||
#include "locator/token_metadata.hh"
|
||||
#include "locator/snitch_base.hh"
|
||||
#include "utils/exceptions.hh"
|
||||
|
||||
namespace gms {
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#include <boost/date_time/gregorian/greg_date.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include "lua.hh"
|
||||
#include "exceptions/exceptions.hh"
|
||||
#include "concrete_types.hh"
|
||||
|
||||
Reference in New Issue
Block a user