[MDEV-32370] Replica should have a way to say it is behind master Created: 2023-10-06  Updated: 2023-12-14  Resolved: 2023-10-08

Status: Closed
Project: MariaDB Server
Component/s: Information Schema, Replication
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Edward Stoever Assignee: Unassigned
Resolution: Duplicate Votes: 1
Labels: None

Issue Links:
Duplicate
duplicates MDEV-32172 introspect server's replication setti... In Review
Relates
relates to MXS-4798 Broken slave promoted to master when ... Closed

 Description   

The only way I know of to view slave status is with the command show slave status;
That means three important values that could be used by scripts or by maxscale are not available:

  • Slave_SQL_Running_State
  • Seconds_Behind_Master
  • Gtid_IO_Pos

There is no way to SHOW SLAVE STATUS INTO @MYVAR;

These values should be made available in global status.

Is there a way to see if the slave is still applying relay logs (behind master)? A global status variable would be a possible method. This could be used by maxscale to know not to promote a slave to master because it has not yet finished applying relay logs.

Related Jira issue: MXS-4798


Generated at Thu Feb 08 10:30:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.