{"id":5390,"date":"2020-07-30T00:13:53","date_gmt":"2020-07-29T16:13:53","guid":{"rendered":"http:\/\/39.97.231.10\/?p=5390"},"modified":"2020-07-30T00:13:53","modified_gmt":"2020-07-29T16:13:53","slug":"mysql-5-7-bug-slave_compressed_protocol-%e4%b8%8e%e5%8d%8a%e5%90%8c%e6%ad%a5%e5%a4%8d%e5%88%b6%e5%90%8c%e6%97%b6%e5%bc%80%e5%90%af%ef%bc%8c%e5%af%bc%e8%87%b4%e4%b8%bb%e5%ba%93%e5%86%99%e5%85%a5","status":"publish","type":"post","link":"http:\/\/www.weijing.co\/?p=5390","title":{"rendered":"MySQL 5.7 Bug slave_compressed_protocol \u4e0e\u534a\u540c\u6b65\u590d\u5236\u540c\u65f6\u5f00\u542f\uff0c\u5bfc\u81f4\u4e3b\u5e93\u5199\u5165\u5361\u4f4f"},"content":{"rendered":"<div>\n<div>\n<div>\nMySQL 5.7 \u540c\u65f6\u5f00\u542f\u534a\u540c\u6b65\u590d\u5236\u548c\u590d\u5236\u538b\u7f29\u534f\u8baeslave_compressed_protocol=ON\uff0c\u4f1a\u89e6\u53d1MySQL Bug\uff0c\u5bfc\u81f4\u4e3b\u5e93\u4e8b\u52a1\u63d0\u4ea4\u5361\u4f4f\u3002<\/p>\n<h5>\u4e00\u3001\u73af\u5883\u914d\u7f6e\uff1a<\/h5>\n<ul>\n<li>MySQL 5.7.19 1\u4e3b2\u4ece<\/li>\n<li>slave_compressed_protocol=ON<\/li>\n<li>\u4e3b\u5e93\uff1arpl_semi_sync_master_enabled=ON\uff0crpl_semi_sync_slave_enabled=OFF<\/li>\n<li>\u4ece\u5e93\uff1arpl_semi_sync_master_enabled=OFF\uff0crpl_semi_sync_slave_enabled=ON<\/li>\n<\/ul>\n<p>\u4e3a\u4e86\u9a8c\u8bc1\u6548\u679c\uff0c\u5c06\u534a\u540c\u6b65\u8d85\u65f6\u53c2\u6570\u8bbe\u7f6e\u5927\u4e00\u70b9\u3002<br \/>\nrpl_semi_sync_master_timeout=1000000<\/p>\n<h5>\u4e8c\u3001Bug\u9a8c\u8bc1<\/h5>\n<p>\u5f80\u4e3b\u5e93\u5199\u5165\u6570\u636e\uff0c\u4f1a\u5361\u4f4f\uff0c\u5927\u698230\u79d2\u540e\uff0c\u624d\u5199\u5165\u6210\u529f\u3002<\/p>\n<pre>mysql&gt; insert into tb select 6;\nQuery OK, 1 row affected (31.78 sec)\nRecords: 1\u00a0 Duplicates: 0\u00a0 Warnings: 0\n<\/pre>\n<p>\u5728\u4ece\u5e93\u4e0a\u68c0\u67e5\u5199\u5165\u7684\u6570\u636e\u786e\u5b9e\u5df2\u7ecf\u590d\u5236\u5230\u4e86\u4ece\u5e93\uff0c\u8fdb\u4e00\u6b65\u53d1\u73b0\uff0c\u6570\u636e\u590d\u5236\u5230\u4ece\u5e93\uff0c\u5e76\u4e0d\u9700\u8981\u7b4930\u79d2\uff0c\u5728\u4e3b\u5e93\u63d0\u4ea4\u540e\uff0c\u51e0\u4e4e\u7acb\u523b\u5c31\u80fd\u590d\u5236\u5230\u4ece\u5e93\uff0c\u4f46\u662f\u4e3b\u5e93\u59cb\u7ec8\u4f1a\u536130\u79d2\u5de6\u53f3\uff0c\u624d\u663e\u793a\u63d0\u4ea4\u6210\u529f\u3002<br \/>\n\u67e5\u770b\u4e3b\u3001\u4ece\u5e93\u7684\u9519\u8bef\u65e5\u5fd7\uff0c\u53d1\u73b0\u5982\u4e0b\uff1a<\/p>\n<pre>2020-02-14T15:52:11.278985+08:00 0 [ERROR] Read semi-sync reply magic number error\n2020-02-14T15:52:11.280066+08:00 0 [ERROR] \/usr\/local\/mysql\/bin\/mysqld: Got timeout reading communication packets\n<\/pre>\n<p>\u7f51\u4e0a\u641c\u7d22\uff0c\u53d1\u73b0\u8fd9\u4e2aBug\u65e9\u5df2\u5b58\u5728\uff0c\u89c1\u5730\u5740\uff1a<a href=\\\"https:\/\/bugs.mysql.com\/bug.php?id=86230\\\">https:\/\/bugs.mysql.com\/bug.php?id=86230<\/a><br \/>\n\u7b80\u5355\u5730\u8bf4\uff0c\u5c31\u662f\u4e3b\u5e93\u7684\u534a\u540c\u6b65\u63a5\u6536ack\u7684\u7ebf\u7a0b\u65e0\u6cd5\u8bc6\u522b\u590d\u5236\u538b\u7f29\u534f\u8bae\uff0c\u4e00\u76f4\u7b49\u5f85\u534a\u540c\u6b65ack\uff0c\u76f4\u5230\u8d85\u65f6\u6216\u8005heartbeat\u5fc3\u8df3\u3002\u597d\u5728\u5b98\u65b9\u57288.0.4\u548c5.7.21\u4e2d\u4fee\u590d\u4e86\u8fd9\u4e2aBug\u3002<br \/>\n\u4e4b\u524d\u63d0\u5230\u4e3b\u5e93\u4f1a\u7b4930\u79d2\u624d\u663e\u793a\u6210\u529f\uff0c\u4e3a\u4ec0\u4e48\u662f30\u79d2\uff0c\u8fd9\u4e2a30\u79d2\u4e0e\u54ea\u4e2a\u53c2\u6570\u6709\u5173\uff1f\u7ecf\u8fc7\u6392\u67e5\uff0c\u6700\u7ec8\u53d1\u73b030\u79d2\u4e0e\u53c2\u6570<br \/>\nmaster_heartbeat_period\u6709\u5173\uff0c\u8c03\u6574\u8be5\u53c2\u6570\u523060\u79d2\uff0c\u53d1\u73b0\u4e3b\u5e93\u5199\u5165\u6570\u636e\u7b49\u5f8560\u79d2\u624d\u6210\u529f\u3002<\/p>\n<pre>change master to master_heartbeat_period=60;\nmysql&gt; insert into tb select 11;\nQuery OK, 1 row affected (1 min 1.82 sec)\nRecords: 1\u00a0 Duplicates: 0\u00a0 Warnings: 0\n<\/pre>\n<h5>\u4e09\u3001\u7ed3\u8bba\uff1a<\/h5>\n<p>slave_compressed_protocol \u4e0e \u534a\u540c\u6b65\u4e00\u8d77\u4f7f\u7528\u4f1a\u89e6\u53d1Bug\uff0c\u5982\u679c\u60f3\u89c4\u907f\u8be5Bug\uff0c\u5982\u4e0b\u5efa\u8bae\uff0c\u4efb\u9009\u5176\u4e00\uff1a<\/p>\n<ul>\n<li>\u4e0d\u5f00\u542f\u590d\u5236\u538b\u7f29\u534f\u8bae<\/li>\n<li>\u4e0d\u5f00\u542f\u534a\u540c\u6b65\u590d\u5236<\/li>\n<li>\u5347\u7ea7MySQL\u7248\u672c\u5230 5.7.21 \u53ca\u4ee5\u4e0a\uff0c\u6216\u8005 8.0.4 \u53ca\u4ee5\u4e0a\u3002<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>MySQL 5.7 \u540c\u65f6\u5f00\u542f\u534a\u540c\u6b65\u590d\u5236\u548c\u590d\u5236\u538b\u7f29\u534f\u8baeslave_compressed_protocol=ON\uff0c &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/www.weijing.co\/?p=5390\"> <span class=\"screen-reader-text\">MySQL 5.7 Bug slave_compressed_protocol \u4e0e\u534a\u540c\u6b65\u590d\u5236\u540c\u65f6\u5f00\u542f\uff0c\u5bfc\u81f4\u4e3b\u5e93\u5199\u5165\u5361\u4f4f<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[90,88],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"mailpoet_newsletter_max":false,"woocommerce_thumbnail":false,"woocommerce_single":false,"woocommerce_gallery_thumbnail":false,"shop_catalog":false,"shop_single":false,"shop_thumbnail":false},"uagb_author_info":{"display_name":"weijing","author_link":"http:\/\/www.weijing.co\/?author=4"},"uagb_comment_info":0,"uagb_excerpt":"MySQL 5.7 \u540c\u65f6\u5f00\u542f\u534a\u540c\u6b65\u590d\u5236\u548c\u590d\u5236\u538b\u7f29\u534f\u8baeslave_compressed_protocol=ON\uff0c&hellip;","_links":{"self":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/5390"}],"collection":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5390"}],"version-history":[{"count":0,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/5390\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5390"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}