This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-14. For the latest, interactive version please visit https://mariadb.com/kb/.

Slave SQL Thread States

This article documents thread states that are related to replication slave SQL threads. These correspond to the Slave_SQL_State shown by SHOW SLAVE STATUS as well as the STATE values listed by the SHOW PROCESSLIST statement and the Information Schema PROCESSLIST as well as the PROCESSLIST_STATE value listed in the Performance Schema threads Table.

ValueDescription
Apply log eventLog event is being applied.
Making temp fileCreating a temporary file containing the row data as part of a LOAD DATA INFILE statement.
Reading event from the relay logReading an event from the relay log in order to process the event.
Slave has read all relay log; waiting for the slave I/O thread to update itAll relay log events have been processed, now waiting for the I/O thread to write new events to the relay log.
Waiting for work from SQL thread In parallel replication the worker thread is waiting for more things from the SQL thread.
Waiting for prior transaction to start commit before starting next transactionIn parallel replication the worker thread is waiting for conflicting things to end before starting executing.
Waiting for worker threads to be idle Happens in parallel replication when moving to a new binary log after a master restart. All slave temporary files are deleted and worker threads are restarted.
Waiting due to global read lockIn parallel replication when worker threads are waiting for a global read lock to be released.
Waiting for worker threads to pause for global read lockFLUSH TABLES WITH READ LOCK is waiting for worker threads to finish what they are doing.
Waiting while replication worker thread pool is busyHappens in parallel replication during a FLUSH TABLES WITH READ LOCK or when changing number of parallel workers.
Waiting for other master connection to process GTID received on multiple master connections A worker thread noticed that there is already another thread executing the same GTID from another connection and it's waiting for the other to complete.
Waiting for slave mutex on exitThread is stopping. Only occurs very briefly.
Waiting for the next event in relay logState before reading next event from the relay log.
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.