Skip to content

Commit cbda23b

Browse files
joaosigmarennox
authored andcommitted
Fix source_retry_count default check
Whenever shell is adopting an unmanaged replication topology to a ReplicaSet, it checks some variables for default values. The 8.1.0 release of MySQL server changed the default of SOURCE_RETRY_COUNT to 10. This patch updates the Shell default value of that variable for that server version (or newer). Change-Id: Ic81c018e3911ea305291e1a1ef52d87405098f9f
1 parent 2e4634d commit cbda23b

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

modules/adminapi/common/star_global_topology_manager.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates.
2+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates.
33
*
44
* This program is free software; you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License, version 2.0,
@@ -131,10 +131,12 @@ void validate_unsupported_options(
131131
}
132132

133133
constexpr auto k_default_connect_retry = 60;
134-
constexpr auto k_default_retry_count = 86400;
135134
constexpr auto k_default_heartbeat_period = 30;
136135
constexpr auto k_default_compression_algorithm = "uncompressed";
137136

137+
const auto k_default_retry_count =
138+
(server_version >= mysqlshdk::utils::Version(8, 1)) ? 10 : 86400;
139+
138140
std::string source_term =
139141
mysqlshdk::mysql::get_replication_source_keyword(server_version);
140142

unittest/scripts/auto/js_adminapi_async/validation/add_instance.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
| SQL_Delay: 0|
237237
| SQL_Remaining_Delay: NULL|
238238
| Slave_SQL_Running_State: <<<__replica_keyword_capital>>> has read all relay log; waiting for more updates|
239-
| Master_Retry_Count: 86400|
239+
| Master_Retry_Count: <<<(__version_num<80100)?86400:10>>>|
240240
| Master_Bind: |
241241
| Last_IO_Error_Timestamp: |
242242
| Last_SQL_Error_Timestamp: |

unittest/scripts/auto/js_adminapi_async/validation/status.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
"connectRetry": 60,
128128
"delay": 0,
129129
"heartbeatPeriod": 30,
130-
"retryCount": 86400
130+
"retryCount": <<<(__version_num<80100)?86400:10>>>
131131
},
132132
"receiverStatus": "ON",
133133
"receiverThreadState": "Waiting for <<<__source_keyword>>> to send event",
@@ -219,7 +219,7 @@
219219
"connectRetry": 60,
220220
"delay": 0,
221221
"heartbeatPeriod": 123,
222-
"retryCount": 86400
222+
"retryCount": <<<(__version_num<80100)?86400:10>>>
223223
},
224224
"receiverStatus": "ON",
225225
"receiverThreadState": "Waiting for <<<__source_keyword>>> to send event",

0 commit comments

Comments
 (0)