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