Skip to content

Commit ce6cce8

Browse files
montywivuvova
authored andcommitted
MDEV-33620 Improve times and states in show processlist for replication
- Slave_IO thread time is now reset between reading events. Before this commit Slave_IO always showed "Waiting for master to send event" and the time was from SLAVE START. Now it shows time since reading last event.
1 parent d2e6fe0 commit ce6cce8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sql/slave.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5006,6 +5006,7 @@ pthread_handler_t handle_slave_io(void *arg)
50065006
important thing is to not confuse users by saying "reading" whereas
50075007
we're in fact receiving nothing.
50085008
*/
5009+
thd->set_time_for_next_stage();
50095010
THD_STAGE_INFO(thd, stage_waiting_for_master_to_send_event);
50105011

50115012
#ifdef ENABLED_DEBUG_SYNC
@@ -5052,6 +5053,7 @@ Stopping slave I/O thread due to out-of-memory error from master");
50525053
} // if (event_len == packet_error)
50535054

50545055
retry_count=0; // ok event, reset retry counter
5056+
thd->set_time_for_next_stage();
50555057
THD_STAGE_INFO(thd, stage_queueing_master_event_to_the_relay_log);
50565058
event_buf= mysql->net.read_pos + 1;
50575059
mi->semi_ack= 0;

0 commit comments

Comments
 (0)