transport, redis: Move total_connections to generic_server::server class
Both cql_server and redis_server have the same "total_connections" member variable so pull that up to the generic_server::server base class.
This commit is contained in:
@@ -46,6 +46,7 @@ protected:
|
||||
promise<> _all_connections_stopped;
|
||||
uint64_t _current_connections = 0;
|
||||
uint64_t _connections_being_accepted = 0;
|
||||
uint64_t _total_connections = 0;
|
||||
|
||||
public:
|
||||
virtual ~server();
|
||||
|
||||
@@ -154,7 +154,7 @@ redis_server::connection::connection(redis_server& server, socket_address server
|
||||
, _write_buf(_fd.output())
|
||||
, _options(server._config._read_consistency_level, server._config._write_consistency_level, server._config._timeout_config, server._auth_service, addr, server._total_redis_db_count)
|
||||
{
|
||||
++_server._stats._total_connections;
|
||||
++_server._total_connections;
|
||||
++_server._current_connections;
|
||||
_server._connections_list.push_back(*this);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,6 @@ public:
|
||||
uint64_t _connections = 0;
|
||||
uint64_t _requests_served = 0;
|
||||
uint64_t _requests_serving = 0;
|
||||
uint64_t _total_connections = 0;
|
||||
utils::estimated_histogram _estimated_requests_latency;
|
||||
utils::timed_rate_moving_average_and_histogram _requests;
|
||||
private:
|
||||
|
||||
@@ -272,7 +272,6 @@ private:
|
||||
private:
|
||||
future<> _stopped = _all_connections_stopped.get_future();
|
||||
boost::intrusive::list<connection> _connections_list;
|
||||
uint64_t _total_connections = 0;
|
||||
private:
|
||||
future<> advertise_new_connection(shared_ptr<connection> conn);
|
||||
future<> unadvertise_connection(shared_ptr<connection> conn);
|
||||
|
||||
Reference in New Issue
Block a user