Replaced monotonic_time() with time()

pull/4517/head
Rahim Kanji 2 years ago
parent 4da04c0282
commit 828ee01cdc

@ -316,7 +316,7 @@ class MyHGC { // MySQL Host Group Container
public:
unsigned int hid;
std::atomic<uint32_t> num_online_servers;
unsigned long long last_log_time_num_online_servers;
time_t last_log_time_num_online_servers;
unsigned long long current_time_now;
uint32_t new_connections_now;
MySrvList *mysrvs;

@ -410,10 +410,10 @@ void MyHGC::refresh_online_server_count() {
}
void MyHGC::log_num_online_server_count_error() {
const unsigned long long curtime = monotonic_time();
const time_t curtime = time(NULL);
// if this is the first time the method is called or if more than 10 seconds have passed since the last log
if (last_log_time_num_online_servers == 0 ||
(curtime - last_log_time_num_online_servers > 10 * 1000 * 1000)) {
((curtime - last_log_time_num_online_servers) > 10)) {
last_log_time_num_online_servers = curtime;
proxy_error(
"Number of online servers detected in a hostgroup exceeds the configured maximum online servers. hostgroup:%u, num_online_servers:%u, max_online_servers:%u\n",

Loading…
Cancel
Save