In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "MySQL main thread state example analysis". In daily operation, I believe many people have doubts in MySQL main thread state example analysis. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "MySQL main thread state example analysis". Next, please follow the editor to study!
Copy the status of the main thread
The most common status of the State column of the Binlog Dump thread of the primary server is listed below. If you don't see any Binlog Dump threads on the master server, this means that replication is not running-that is, there are currently no slave servers connected.
Sending binlog event to slave
The binary log consists of various events, and an event is usually an update plus some other information. The thread has read an event from the binary log and is sending it to the slave server.
Finished reading one binlog; switching to next binlog
The thread has finished reading the binary log file and is opening the next log file to be sent to the slave server.
Has sent all binlog to slave; waiting for binlog to be updated
The thread has read all major updates from the binary log and has sent them to the slave server. The thread is now idle, waiting for new events to appear in the binary log caused by new updates on the primary server.
Waiting to finalize termination
A very simple state that occurs when a thread stops.
Copy the state of the thread from Icano
The most common status of the State column of the I / O thread from the server is listed below. This state also appears in the Slave_IO_State column and is displayed by SHOW SLAVE STATUS. This means that you can only use this sentence to take a closer look at what happened.
Connecting to master
The thread is trying to connect to the primary server.
Checking master version
A temporary state that occurs immediately after a connection with the primary server is established.
Registering slave on master
A temporary state that occurs immediately after a connection with the primary server is established.
Requesting binlog dump
A temporary state that occurs immediately after a connection with the primary server is established. The thread sends a request to the primary server for the contents of the binary log starting from the requested binary log file name and location.
Waiting to reconnect after a failed binlog dump request
If the binary log dump request fails (because there is no connection), the thread goes to sleep and then periodically attempts to reconnect. You can use the-- master-connect-retry option to specify the interval between retries.
Reconnecting after a failed binlog dump request
The thread is trying to reconnect to the primary server.
Waiting for master to send event
The thread is connected to the primary server and is waiting for the binary log event to arrive. If the primary server is idle, it will last for a long time. If the wait lasts for slave_read_timeout seconds, a timeout occurs. At this point, the thread thinks the connection is broken and attempts to reconnect.
Queueing master event to the relay log
The thread has read an event and is copying it to the relay log for processing by the SQL thread.
Waiting to reconnect after a failed master event read
An error occurred while reading (because there is no connection). The thread will sleep master-connect-retry seconds before attempting to reconnect.
Reconnecting after a failed master event read
The thread is trying to reconnect to the primary server. When the connection is re-established, the state changes to Waiting for master to send event.
Waiting for the slave SQL thread to free enough relay log space
A non-zero relay _ log_space_ value is being used, and the relay log has grown to a combined size that exceeds that value. The Icano thread is waiting until the SQL thread processes the contents of the relay log and deletes some of the relay log files to free up enough space.
Waiting for slave mutex on exit
A very simple state that occurs when a thread stops.
Copy from SQL thread state
The most common status of the State column of SQL threads from the server is listed below.
Reading event from the relay log
The thread has read an event from the relay log and is ready to process the event.
Has read all relay log; waiting for the slave I/O thread to update it
The thread has processed all the events in the relay log file and is now waiting for the I / O thread to write the new event to the relay log.
Waiting for slave mutex on exit
A very simple state that occurs when a thread stops.
The State column of the Icano thread can also display the text of the statement. This indicates that the thread has read an event from the relay log, extracted the statement from it, and is executing the statement.
At this point, the study on "MySQL main thread status example analysis" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.