Skip to content

Commit

Permalink
Merge pull request #4077 from sysown/v2.x-4018
Browse files Browse the repository at this point in the history
Do not shun servers with max_replication_lag = 0 #4018
  • Loading branch information
renecannao authored Jan 12, 2023
2 parents a2be188 + 90670b4 commit 3998873
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/MySQL_HostGroups_Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3554,7 +3554,11 @@ void MySQL_HostGroups_Manager::replication_lag_action_inner(MyHGC *myhgc, char *
if (
// (current_replication_lag==-1 )
// ||
(current_replication_lag>=0 && ((unsigned int)current_replication_lag > mysrvc->max_replication_lag))
(
current_replication_lag>=0 &&
mysrvc->max_replication_lag > 0 && // see issue #4018
((unsigned int)current_replication_lag > mysrvc->max_replication_lag)
)
) {
// always increase the counter
mysrvc->cur_replication_lag_count += 1;
Expand Down

0 comments on commit 3998873

Please sign in to comment.