现象
目前线上有套基于MySQL 8.0.26做的增强半同步主从复制数据库,查看log_errorr发现有部分net_flush()执行失败的报错:
2021-12-28T14:04:24.663005+08:00 11 [ERROR] [MY-011161] [Repl] Semi-sync master failed on net_flush() before waiting for replica reply.
2021-12-28T14:51:49.217811+08:00 413824 [ERROR] [MY-011161] [Repl] Semi-sync master failed on net_flush() before waiting for replica reply.
2022-07-15T14:53:48.661852+08:00 14621647 [ERROR] [MY-011161] [Repl] Semi-sync master failed on net_flush() before waiting for replica reply.
2022-11-15T16:35:27.219541+08:00 1479506 [ERROR] [MY-011161] [Repl] Semi-sync master failed on net_flush() before waiting for replica reply.
2022-11-15T17:15:12.815920+08:00 1558519 [ERROR] [MY-011161] [Repl] Semi-sync master failed on net_flush() before waiting for replica reply.
2022-11-15T19:32:27.765331+08:00 1567874 [ERROR] [MY-011161] [Repl] Semi-sync master failed on net_flush() before waiting for replica reply.
2022-11-15T20:17:57.104040+08:00 1570576 [ERROR] [MY-011161] [Repl] Semi-sync master failed on net_flush() before waiting for replica reply.
2022-11-16T20:51:59.230221+08:00 1571592 [ERROR] [MY-011161] [Repl] Semi-sync master failed on net_flush() before waiting for replica reply.
MySQL增强半同步master端在等待slave端reply前执行net_flush()失败,而根据业务反馈没有影响业务。
在MySQL 5.7和MariaDB 10版本会造成slave端“IO Thread”挂起:
参考案例:https://blog.51cto.com/hcymysql/2146955
MySQL官方在MySQL 5.7存在BUG:
参考:
https://bugs.mysql.com/bug.php?id=79865
标签:flush,failed,master,MySQL,reply,net,before From: https://www.cnblogs.com/haha029/p/16968203.html