Bug #95655 Improve replication error message with MTS

Submitted: 5 Jun 2019 12:24 Modified: 6 Jun 2019 4:48
Reporter: Simon Mudd Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:8.0.16 OS:Any
Assigned to: CPU Architecture:Any
Tags: error messages, MTS, replication

[5 Jun 2019 12:24] Simon Mudd
Description:
A recent error in 8.0.16 when using MTS shows this error message:

Slave SQL Running: No, SQL Error 3547: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction '03975850-8766-11e9-87b1-52540078a1be:34' at master log binlog.000001, end_log_pos 8599. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any. (10 workers)

Yet the table contains several rows and I am only interested in the errors.

How to repeat:
Break replication using WRITESET or something else where MTS is enabled.

In my specific case this showed 2 column values like this:

                                           CHANNEL_NAME:
                                              WORKER_ID: 1
                                              THREAD_ID: NULL
                                          SERVICE_STATE: OFF
                                      LAST_ERROR_NUMBER: 3547
                                     LAST_ERROR_MESSAGE: Worker 1 failed executing transaction '03975850-8766-11e9-87b1-52540078a1be:34' at master log binlog.000001, end_log_pos 8599; Error 'Can not lock user management caches for processing.' on query. Default database: ''. Query: 'DROP USER IF EXISTS 'some_user'@'some_net''

Suggested fix:
Adjust the error message so suggest doing something like:

select * from performance_schema.replication_applier_status_by_worker where LAST_ERROR_NUMBER <> 0 and SERVICE_STATE='OFF'\G
[6 Jun 2019 4:48] MySQL Verification Team
Hello Simon,

Thank you for the feature request!

regards,
Umesh

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

Page generated in 0.052 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.