mysql5.7从库多线程报错:
2018-02-25T07:11:52.613073Z 11 [Note] Multi-threaded slave statistics for channel '': seconds elapsed = 124; events assigned = 211909633; worker queues filled over overrun level = 165380; waited due a Worker queue full = 69203; waited due the total size = 1987; waited at clock conflicts = 0 waited (count) when Workers occupied = 9003466 waited when Workers occupied = 0
我们通过源代码,找到下面一段,该段实现了上述日志的输出。
if ((my_now – rli->mts_last_online_stat)>=
mts_online_stat_period)
{
sql_print_information(“Multi-threadedslave statistics%s: “
“seconds elapsed = %lu; “
“events assigned = %llu; “
“worker queues filled over overrun level = %lu;”
“waited due a Worker queue full = %lu; “
“waited due the total size = %lu; “
“waited at clock conflicts = %llu “
“waited(count) when Workers occupied = %lu “
“waited when Workers occupied = %llu”,
rli->get_for_channel_str(),
static_cast<unsignedlong>
(my_now – rli->mts_last_online_stat),
rli->mts_events_assigned,
rli->mts_wq_overrun_cnt,
rli->mts_wq_overfill_cnt,
rli->wq_size_waits_cnt,
rli->mts_total_wait_overlap,
rli->mts_wq_no_underrun_cnt,
rli->mts_total_wait_worker_avail);
rli->mts_last_online_stat=my_now;
当(my_now – rli->mts_last_online_stat) >= mts_online_stat_period时,会实现打印日志,以及最后一句rli->mts_last_online_stat=my_now,打印日志后重新将my_now赋值给rli->mts_last_online_stat; 可以得知, seconds elapsed 就是上一次统计跟这一次统计的时间间隔。
而mts_online_stat_period =120秒,硬代码,因此就是几乎每隔120秒,就有上述日志的输出。
http://blog.csdn.net/isoleo/article/details/54342180