1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-35304: Add Connects_Tried and Master_Retry_Count to SSS

When the IO thread (re)connect to a primary,
no updates are available besides unique errors that cause the failure.
These new `Master_info` numbers supplement SHOW SLAVE STATUS’s (most-
recent) ‘Connecting’ state with statistics on (re)connect attempts:

* `Connects_Tried`: how many retries have been attempted so far
  This was previously a local variable that only counted re-attempts;
  it’s now meaningful even after the “Connecting” state concludes.
* `Master_Retry_Count` (from MDEV-25674): out of how many configured

Side-note: Some of the tests updated by this commit dump the entire
SHOW SLAVE STATUS, which might include non-deterministic entries.

Reviewed-by: Kristian Nielsen <knielsen@knielsen-hq.org>
Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
This commit is contained in:
ParadoxV5
2025-02-20 16:56:12 -07:00
parent 7094a75596
commit e2dbd9b6ac
19 changed files with 374 additions and 79 deletions

View File

@@ -74,6 +74,8 @@ Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
Replicate_Rewrite_DB
Connects_Tried 1
Master_Retry_Count 100000
Retried_transactions 0
Max_relay_log_size 1073741824
Executed_log_entries 7
@@ -139,6 +141,8 @@ Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
Replicate_Rewrite_DB
Connects_Tried 1
Master_Retry_Count 100000
Retried_transactions 0
Max_relay_log_size 1073741824
Executed_log_entries 7
@@ -269,6 +273,8 @@ Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
Replicate_Rewrite_DB
Connects_Tried 1
Master_Retry_Count 100000
reset slave 'slave1';
show all slaves status;
Connection_name slave1
@@ -327,6 +333,8 @@ Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
Replicate_Rewrite_DB
Connects_Tried 0
Master_Retry_Count 100000
Retried_transactions 0
Max_relay_log_size 1073741824
Executed_log_entries 7
@@ -392,6 +400,8 @@ Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
Replicate_Rewrite_DB
Connects_Tried 1
Master_Retry_Count 100000
Retried_transactions 0
Max_relay_log_size 1073741824
Executed_log_entries 7
@@ -459,6 +469,8 @@ Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
Replicate_Rewrite_DB
Connects_Tried 1
Master_Retry_Count 100000
Retried_transactions 0
Max_relay_log_size 1073741824
Executed_log_entries 7
@@ -528,6 +540,8 @@ Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
Replicate_Rewrite_DB
Connects_Tried 1
Master_Retry_Count 100000
Retried_transactions 0
Max_relay_log_size 1073741824
Executed_log_entries 7