1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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

@ -3707,6 +3707,7 @@ int reset_slave(THD *thd, Master_info* mi)
mi->rli.clear_until_condition();
mi->rli.clear_sql_delay();
mi->rli.slave_skip_counter= 0;
mi->connects_tried= 0;
mi->rli.newest_master_timestamp= 0;
mi->rli.slave_timestamp= 0;