1. 程式人生 > >MySQL半同步復制--handle_slave_io等待master發送event

MySQL半同步復制--handle_slave_io等待master發送event

mysql handle_slave_io

handle_slave_io函數調用read_event函數:

read_event函數從連接中讀取事件,如果沒有事件將會阻塞在這裏等待master發送事件。

#0  0x00898402 in __kernel_vsyscall ()
#1  0x00c28133 in poll () from /lib/libc.so.6
#2  0x08a90315 in vio_io_wait (vio=0xa82faa8, event=VIO_IO_EVENT_READ, timeout=3600000)
    at /home/mysql26/mysql-5.6.26/vio/viosocket.c:771
#3  0x08a8eb78 in vio_socket_io_wait (vio=0xa82faa8, event=VIO_IO_EVENT_READ)
    at /home/mysql26/mysql-5.6.26/vio/viosocket.c:68
#4  0x08a8ec6a in vio_read (vio=0xa82faa8, buf=0xa882c90 "P", size=16384)
    at /home/mysql26/mysql-5.6.26/vio/viosocket.c:123
#5  0x08a8ef05 in vio_read_buff (vio=0xa82faa8, buf=0xa89a530 "\031", size=4)
    at /home/mysql26/mysql-5.6.26/vio/viosocket.c:157
#6  0x0830e010 in net_read_raw_loop (net=0xa7591b8, count=4) at /home/mysql26/mysql-5.6.26/sql/net_serv.cc:669
#7  0x0830e1f2 in net_read_packet_header (net=0xa7591b8) at /home/mysql26/mysql-5.6.26/sql/net_serv.cc:757
#8  0x0830ef83 in net_read_packet (net=0xa7591b8, complen=0xa34fc168)
    at /home/mysql26/mysql-5.6.26/sql/net_serv.cc:816
#9  0x0830f0ea in my_net_read (net=0xa7591b8) at /home/mysql26/mysql-5.6.26/sql/net_serv.cc:894
#10 0x084af8a0 in cli_safe_read (mysql=0xa7591b8) at /home/mysql26/mysql-5.6.26/sql-common/client.c:620
#11 0x0866f2da in read_event (mysql=0xa7591b8, mi=0xa709368, suppress_warnings=0xa34fc31b)
    at /home/mysql26/mysql-5.6.26/sql/rpl_slave.cc:3533
#12 0x086799f6 in handle_slave_io (arg=0xa709368) at /home/mysql26/mysql-5.6.26/sql/rpl_slave.cc:4730
#13 0x089b3141 in pfs_spawn_thread (arg=0xa8302b0) at /home/mysql26/mysql-5.6.26/storage/perfschema/pfs.cc:1860
#14 0x00cdc832 in start_thread () from /lib/libpthread.so.0
#15 0x00c31e0e in clone () from /lib/libc.so.6


本文出自 “yanzongshuai的專欄” 博客,請務必保留此出處http://yanzongshuai.blog.51cto.com/3057928/1971535

MySQL半同步復制--handle_slave_io等待master發送event