From 0e0f3f8c2ecab5256d5a3f7a91a8b12b19c99b53 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Mon, 19 Apr 2021 20:30:17 +0530 Subject: [PATCH] MM-34983: Remove check for number of data sources (#17431) In case of Aurora databases, a single endpoint might load balance between multiple replicas. In that case, this check is incorrect. Therefore, we remove it https://mattermost.atlassian.net/browse/MM-34983 Co-authored-by: Mattermod --- i18n/en.json | 4 ---- model/config.go | 4 ---- 2 files changed, 8 deletions(-) diff --git a/i18n/en.json b/i18n/en.json index fa5e4f8479..a8ed5d2183 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -8162,10 +8162,6 @@ "id": "model.config.is_valid.read_timeout.app_error", "translation": "Invalid value for read timeout." }, - { - "id": "model.config.is_valid.replica_mismatch.app_error", - "translation": "Number of replica lag queries is more than the number of replicas configured. Must be less than or equal to the number of replicas." - }, { "id": "model.config.is_valid.restrict_direct_message.app_error", "translation": "Invalid direct message restriction. Must be 'any', or 'team'." diff --git a/model/config.go b/model/config.go index 3a5d7b72d8..35d70033a7 100644 --- a/model/config.go +++ b/model/config.go @@ -3396,10 +3396,6 @@ func (s *SqlSettings) isValid() *AppError { return NewAppError("Config.IsValid", "model.config.is_valid.sql_max_conn.app_error", nil, "", http.StatusBadRequest) } - if len(s.ReplicaLagSettings) > len(s.DataSourceReplicas) { - return NewAppError("Config.IsValid", "model.config.is_valid.replica_mismatch.app_error", nil, "", http.StatusBadRequest) - } - return nil }