Bug #72826 Add support for joining replication_execute_status_by_% using the WORKER_ID

Submitted: 1 Jun 2014 4:04
Reporter: Jesper wisborg Krogh Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S4 (Feature request)
Version:5.7 OS:Any
Assigned to: Marc ALFF CPU Architecture:Any

[1 Jun 2014 4:04] Jesper wisborg Krogh
Description:
The Performance Schema table replication_execute_status_by_coordinator contains a summary of the replication status and in case of an error in one of the SQL thread workers, it will display which worker encountered the error, e.g.:

slave> SELECT * FROM performance_schema.replication_execute_status_by_coordinator\G
*************************** 1. row ***************************
           THREAD_ID: NULL
       SERVICE_STATE: OFF
   LAST_ERROR_NUMBER: 1062
  LAST_ERROR_MESSAGE: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction '' at master log , end_log_pos 587543. See error log and/or performance_schema.replication_execute_status_by_worker table for more details about this failure or others, if any.
LAST_ERROR_TIMESTAMP: 2014-06-01 13:10:07
1 row in set (0.01 sec)

The details are then available from the row for that worker in replication_execute_status_by_worker, e.g.:

slave> SELECT * FROM performance_schema.replication_execute_status_by_worker WHERE LAST_ERROR_NUMBER <> 0\G
*************************** 1. row ***************************
            WORKER_ID: 1
            THREAD_ID: NULL
        SERVICE_STATE: OFF
LAST_SEEN_TRANSACTION: ANONYMOUS
    LAST_ERROR_NUMBER: 1062
   LAST_ERROR_MESSAGE: Worker 1 failed executing transaction '' at master log , end_log_pos 587543; Could not execute Write_rows event on table world.City; Duplicate entry '4080' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 587543
 LAST_ERROR_TIMESTAMP: 2014-06-01 13:10:07
1 row in set (0.01 sec)

But other than trying to parse LAST_ERROR_MESSAGE from replication_execute_status_by_coordinator you can't write a query that JOINs into replication_execute_status_by_worker (or a stored procedure that finds the details for you).

So it would be good if support is added to get the WORKER_ID directly.

How to repeat:
N/A

Suggested fix:
N/A

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.048 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.