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:
@@ -9207,14 +9207,14 @@ int make_proc_old_format(THD *thd, ST_SCHEMA_TABLE *schema_table)
|
||||
Constants for columns that are present in
|
||||
SHOW ALL SLAVES STATUS
|
||||
that are not in SHOW SLAVE STATUS. Specifically, columns 0 and 1, and
|
||||
everything at and above 56.
|
||||
everything at and above 58.
|
||||
0: Connection_name
|
||||
1: Slave_SQL_State
|
||||
56: Retried_transactions
|
||||
58: Retried_transactions
|
||||
*/
|
||||
#define SLAVE_STATUS_COL_CONNECTION_NAME 0
|
||||
#define SLAVE_STATUS_COL_SLAVE_SQL_STATE 1
|
||||
#define SLAVE_STATUS_COL_RETRIED_TRANSACTIONS 56
|
||||
#define SLAVE_STATUS_COL_RETRIED_TRANSACTIONS 58
|
||||
|
||||
static int make_slave_status_old_format(THD *thd, ST_SCHEMA_TABLE *schema_table)
|
||||
{
|
||||
@@ -10708,6 +10708,8 @@ ST_FIELD_INFO slave_status_info[]=
|
||||
Column("Slave_Non_Transactional_Groups", ULonglong(20), NOT_NULL),
|
||||
Column("Slave_Transactional_Groups", ULonglong(20), NOT_NULL),
|
||||
Column("Replicate_Rewrite_DB", Varchar(), NOT_NULL),
|
||||
Column("Connects_Tried", ULonglong(20), NOT_NULL),
|
||||
Column("Master_Retry_Count", ULonglong(20), NOT_NULL),
|
||||
Column("Retried_transactions", ULong(10), NOT_NULL),
|
||||
Column("Max_relay_log_size", ULong(10), NOT_NULL),
|
||||
Column("Executed_log_entries", ULong(10), NOT_NULL),
|
||||
|
Reference in New Issue
Block a user