From c1ced69cb5c571c5ed965784d61c5bc83a8367dc Mon Sep 17 00:00:00 2001 From: Valentin Rakush Date: Fri, 22 Nov 2019 10:41:25 +0000 Subject: [PATCH] Aurora replication lag: fix for master replication lag --- lib/MySQL_Monitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MySQL_Monitor.cpp b/lib/MySQL_Monitor.cpp index 74caadba9..32b5ee0e4 100644 --- a/lib/MySQL_Monitor.cpp +++ b/lib/MySQL_Monitor.cpp @@ -4659,7 +4659,7 @@ unsigned int MySQL_Monitor::estimate_lag(char* server_id, AWS_Aurora_status_entr if (!aase[idx] || !aase[idx]->host_statuses) break; for (auto hse : *(aase[idx]->host_statuses)) { - if (strcmp(server_id, hse->server_id)==0) { + if (strcmp(server_id, hse->server_id)==0 && (unsigned int)hse->replica_lag_ms != 0) { unsigned int ms = std::max(((unsigned int)hse->replica_lag_ms + add_lag_ms), min_lag_ms); if (ms > mlag) mlag = ms; if (!lag) lag = ms;