{"id":13032,"date":"2025-03-21T10:01:25","date_gmt":"2025-03-21T02:01:25","guid":{"rendered":"https:\/\/www.gbase8.cn\/?p=13032"},"modified":"2025-03-21T10:01:27","modified_gmt":"2025-03-21T02:01:27","slug":"gbase-8a-953%e7%94%a8eventmode%e5%81%9a%e8%8a%82%e7%82%b9%e6%9b%bf%e6%8d%a2","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/13032","title":{"rendered":"GBase 8a 953\u7528eventMode\u505a\u8282\u70b9\u66ff\u6362"},"content":{"rendered":"<p>GBase 8a 953\u90e8\u5206\u7248\u672c\u65b0\u589e\u52a0\u4e86eventMode\u505a\u8282\u70b9\u66ff\u6362\u7684\u9009\u9879\u3002\u8be5\u9009\u9879\u4ec5\u7528\u4e8e\u6570\u636e\u670d\u52a1\u7684\u66ff\u6362\uff0c\u7ba1\u7406\u548c\u8c03\u5ea6\u670d\u52a1\u66ff\u6362\u7ef4\u6301\u539f\u72b6\uff0c\u539f\u6709\u7684\u91cd\u5206\u5e03\u6a21\u5f0f\u7684\u6570\u636e\u670d\u52a1\u66ff\u6362\u65b9\u6848\u4f9d\u65e7\u3002<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Directory Navigation<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2b1660d526b\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2b1660d526b\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.gbase8.cn\/en\/13032\/#%E7%8E%AF%E5%A2%83\" >\u73af\u5883<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.gbase8.cn\/en\/13032\/#%E6%94%AF%E6%8C%81%E7%9A%84%E7%89%88%E6%9C%AC\" >\u652f\u6301\u7684\u7248\u672c<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.gbase8.cn\/en\/13032\/#%E6%B5%8B%E8%AF%95%E9%9B%86%E7%BE%A4\" >\u6d4b\u8bd5\u96c6\u7fa4<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.gbase8.cn\/en\/13032\/#eventMode%E6%9B%BF%E6%8D%A2%E5%91%BD%E4%BB%A4\" >eventMode\u66ff\u6362\u547d\u4ee4<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.gbase8.cn\/en\/13032\/#eventMode%E6%9B%BF%E6%8D%A2%E8%A6%81%E6%B1%82\" >eventMode\u66ff\u6362\u8981\u6c42<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.gbase8.cn\/en\/13032\/#eventMode%E6%9B%BF%E6%8D%A2%E6%89%A7%E8%A1%8C%E8%BF%87%E7%A8%8B\" >eventMode\u66ff\u6362\u6267\u884c\u8fc7\u7a0b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.gbase8.cn\/en\/13032\/#%E6%80%BB%E7%BB%93\" >Summary<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E7%8E%AF%E5%A2%83\"><\/span>\u73af\u5883<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%94%AF%E6%8C%81%E7%9A%84%E7%89%88%E6%9C%AC\"><\/span>\u652f\u6301\u7684\u7248\u672c<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u8be5\u529f\u80fd\u76ee\u524d(2025-03-21)\u57289.5.3.28.18R1_Patch.8\u5b9e\u73b0\uff0c\u540e\u7eed\u3010\u53ef\u80fd\u3011\u5408\u5165\u5176\u5b83\u7248\u672c\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%B5%8B%E8%AF%95%E9%9B%86%E7%BE%A4\"><\/span>\u6d4b\u8bd5\u96c6\u7fa4<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>3\u8282\u70b9\u96c6\u7fa4\uff0c1\u4e2a\u7ba1\u7406+1\u4e2a\u8c03\u5ea6+3\u4e2a\u6570\u636e\u3002\u5176\u4e2d1\u4e2a\u7eaf\u6570\u636e\u670d\u52a1\u6545\u969c\uff0c\u8bbe\u7f6e\u6210\u4e86unavailable\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u6545\u969c\u8282\u70b9\u662f\u590d\u5408\u8282\u70b9\uff0c\u5148\u7528\u539f\u6709\u65b9\u6848\u66ff\u6362\u5176\u5b83\u670d\u52a1\uff0c\u6700\u540e\u66ff\u6362\u6570\u636e\u670d\u52a1\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;gbase@rh151 gcinstall]$ gcadmin\r\nCLUSTER STATE:         ACTIVE\r\nVIRTUAL CLUSTER MODE:  NORMAL\r\n\r\n====================================\r\n| GBASE GCWARE CLUSTER INFORMATION |\r\n====================================\r\n| NodeName |  IpAddress   | gcware |\r\n------------------------------------\r\n| gcware1  |  10.0.2.151  |  OPEN  |\r\n------------------------------------\r\n====================================================\r\n|      GBASE COORDINATOR CLUSTER INFORMATION       |\r\n====================================================\r\n|   NodeName   | IpAddress  | gcluster | DataState |\r\n----------------------------------------------------\r\n| coordinator1 | 10.0.2.151 |   OPEN   |     0     |\r\n----------------------------------------------------\r\n===============================================================================================================\r\n|                                       GBASE DATA CLUSTER INFORMATION                                        |\r\n===============================================================================================================\r\n| NodeName |                IpAddress                 | DistributionId |    gnode    | syncserver | DataState |\r\n---------------------------------------------------------------------------------------------------------------\r\n|  node1   |                10.0.2.152                |      1,2       | UNAVAILABLE |            |           |\r\n---------------------------------------------------------------------------------------------------------------\r\n|  node2   |                10.0.2.151                |      1,2       |    OPEN     |    OPEN    |     0     |\r\n---------------------------------------------------------------------------------------------------------------\r\n|  node3   |                10.0.2.153                |      1,2       |    OPEN     |    OPEN    |     0     |\r\n---------------------------------------------------------------------------------------------------------------<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"eventMode%E6%9B%BF%E6%8D%A2%E5%91%BD%E4%BB%A4\"><\/span>eventMode\u66ff\u6362\u547d\u4ee4<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>.\/replace.py  --feventMode --host=10.0.2.152 --dbaUser=gbase --dbaUserPwd=XXXX --generalDBUse=gbase --generalDBPwd=XXXXXX --overwrite --type=data<\/code><\/pre>\n\n\n\n<p>--feventMode \u4e3a\u65b0\u589e\u52a0\u53c2\u6570\uff0c\u91c7\u7528event\u6a21\u5f0f\u505a\u6570\u636e\u670d\u52a1\u7684\u66ff\u6362\uff0c\u5982\u679c\u6ca1\u6709\u8fd9\u4e2a\u53c2\u6570\uff0c\u91c7\u7528\u539f\u6709\u7684\u91cd\u5206\u5e03\u6a21\u5f0f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"eventMode%E6%9B%BF%E6%8D%A2%E8%A6%81%E6%B1%82\"><\/span>eventMode\u66ff\u6362\u8981\u6c42<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u672c\u7248\u672c\u7684eventMode\u66ff\u6362\uff0c\u5982\u679c\u6b63\u5728\u505a\u91cd\u5206\u5e03\uff0c\u6bd4\u5982\u6269\u5bb9\uff0c\u5fc5\u987b\u5148\u505c\u4e0b\u6765\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>gcluster_rebalancing_concurrent_count \u5fc5\u987b\u8bbe\u7f6e\u4e3a0 \uff08set global XXXX=0\uff09<\/li><li>gclusterdb.rebalancing_status\u8868\u5fc5\u987b\u4e3a\u7a7a (truncae table XXXXX)<\/li><\/ul>\n\n\n\n<p>\u7b49\u8282\u70b9\u66ff\u6362\u7684\u6545\u969c\u8282\u70b9\u6240\u6709event\u90fd\u6062\u590d\u4e86\uff0c\u518d\u7ee7\u7eed\u91cd\u5206\u5e03\uff1a\u901a\u8fc7\u8fd0\u884crebalance instance\u4f1a\u518d\u6b21\u586b\u5145gclusterdb.rebalancing_status\u8868\u3002<\/p>\n\n\n\n<p>\u672c\u8981\u6c42\u4f1a\u5728\u66ff\u6362\u65f6\u505a\u68c0\u67e5\uff0c\u5982\u4e0d\u6ee1\u8db3\u4f1a\u62a5\u9519\u9000\u51fa\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"eventMode%E6%9B%BF%E6%8D%A2%E6%89%A7%E8%A1%8C%E8%BF%87%E7%A8%8B\"><\/span>eventMode\u66ff\u6362\u6267\u884c\u8fc7\u7a0b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u5176\u4e2d\u7ea2\u8272\u7684\u5b57\u4f53\uff0c\u662f\u68c0\u67e5\u524d\u9762\u8981\u6c42\u7684\uff1a<\/p>\n\n\n\n<p><strong><span class=\"has-inline-color has-luminous-vivid-orange-color\">gcluster_rebalancing_concurrent_count value was 0 at coordinator 10.0.2.151<br>table gclusterdb.rebalancing_status was empty<\/span><\/strong><\/p>\n\n\n\n<p>\u66ff\u6362\u6210\u529f\u540e\u7684\u5982\u4e0b\u8f93\u51fa\uff0c\u662f\u63d0\u9192\u5728event\u5b8c\u6210\u540c\u6b65\u524d\uff0c\u4e0d\u8981\u7ee7\u7eed\u505a\u91cd\u5206\u5e03\u3002<\/p>\n\n\n\n<p><strong><span class=\"has-inline-color has-luminous-vivid-orange-color\">please wait all dmlstorageevent recover success, do not start rebalance before it<\/span><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>install prefix: \/opt\/gbase\/10.0.2.151\r\nexecute replace node os user: gbase\r\nreplaced nodes: &#91;'10.0.2.152']\r\nreplace node type: data\r\ndbaHome: \/home\/gbase\r\ncheck DBA_HOME environment variable\r\nIsAutoGcware: True\r\nfeventMode: True\r\ncoordinator hosts: &#91;'10.0.2.151']\r\ndata hosts: &#91;'10.0.2.152', '10.0.2.151', '10.0.2.153']\r\nfreenode hosts: &#91;]\r\nnode address type: IPV4\r\nlocalHost is: 10.0.2.151\r\ncoorIdDict: {'10.0.2.151': '2533490698'}\r\ngcware mode: single vc mode\r\nhost 10.0.2.152 node state: UNAVAILABLE\r\nhost 10.0.2.152 node state: UNAVAILABLE\r\ncheck login all host\r\n10.0.2.152\r\nAre you sure to replace install these nodes (&#91;Y,y]\/&#91;N,n])? y\r\ncheck database user and password ...\r\ncheck database user and password successful\r\ncheck rebalance status ...\r\ndistribution id list:&#91;'2', '1']\r\n<strong><span class=\"has-inline-color has-luminous-vivid-orange-color\">gcluster_rebalancing_concurrent_count value was 0 at coordinator 10.0.2.151\r\ntable gclusterdb.rebalancing_status was empty<\/span><\/strong>\r\ncheck rebalance status successful\r\ncheck crontab privilege ...\r\nget server and data host dict\r\ncreate flag file every data host\r\nread host list every data host\r\ndelete flag file every data host\r\nget server and data host dict end\r\ncheck crontab privilege successfully\r\n10.0.2.152 os type is CentOS\r\nchecking rpms ...\r\nuninstall host &#91;'10.0.2.152'] begin\r\ncheck and stop gcmonit ...\r\ncheck and stop gcmonit successful\r\nuninstall host &#91;'10.0.2.152'] end\r\ninstall host &#91;'10.0.2.152'] begin\r\nmkdir \/opt\/gbase\/10.0.2.152\/cluster_prepare on host 10.0.2.152.\r\nCopying \/home\/gbase\/gcinstall\/10.0.2.152.options to host 10.0.2.152:\/opt\/gbase\/10.0.2.152\/cluster_prepare\r\nCopying data files to host 10.0.2.152 successfully\r\nsend install command: \/usr\/bin\/python \/opt\/gbase\/10.0.2.152\/cluster_prepare\/InstallTar.py --silent=\/opt\/gbase\/10.0.2.152\/cluster_prepare\/10.0.2.152.options  --IsData --type=data --IsAutoGcware --uuid=ddb84e64-0551-11f0-adb0-08002773b683\r\ninstall host &#91;'10.0.2.152'] end\r\nsync cluster config file begin\r\nsync cluster config file end\r\nsync kerberos file begin\r\nsync kerberos file end\r\nStarting all gcluster nodes ...\r\nget multi instance on replaced host\r\nmulti instance dictionary:{'10.0.2.152': &#91;'10.0.2.152']}\r\nBegin to exec gcadmin replacenodes ...\r\nget table id and set dmlstorageevent on node &#91;10.0.2.151], please wait a moment\r\ncheck ip start ......\r\ncheck ip end ......\r\n\r\nswitch cluster mode into READONLY start ......\r\nwait all ddl statement stop ......\r\n\r\nall ddl statement stoped\r\nswitch cluster mode into READONLY end ......\r\n\r\ngcadmin check rebalance status start ......\r\ndistribution number:2\r\ngcadmin check rebalance status end ......\r\ndelete all fevent log on replace nodes start ......\r\ndelete ddl event log on node 10.0.2.152 start\r\ndelete ddl event log on node 10.0.2.152 end\r\ndelete dml event log on node 10.0.2.152 start\r\ndelete dml event log on node 10.0.2.152 end\r\ndelete dml storage event log on node 10.0.2.152 start\r\ndelete dml storage event log on node 10.0.2.152 end\r\ndelete all fevent log on replace nodes end ......\r\n\r\nsync dataserver metedata begin ......\r\ncopy script to data node begin\r\ncopy script to data node end\r\nbuild data packet begin\r\nbuild data packet end\r\ncopy data packet to target node begin\r\ncopy data packet to target node end\r\nextract data packet begin\r\nextract data packet end\r\nsync dataserver metedata end, spend time 46898 ms ......\r\n\r\ncreate database start ......\r\ncreate database end ......\r\nrestore node state start ......\r\nrestore node state end ......\r\n\r\nreplace nodes spend time: 101831 ms\r\n\r\nset dmlstorageevent success\r\n<strong><span class=\"has-inline-color has-luminous-vivid-orange-color\">please wait all dmlstorageevent recover success, do not start rebalance before it<\/span><\/strong>\r\nReplace gcluster nodes successfully.\r\n&#91;gbase@rh151 gcinstall]$<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%80%BB%E7%BB%93\"><\/span>Summary<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u8be5\u65b9\u6cd5\u4ec5\u662f\u4e00\u4e2a\u65b0\u7684\u5b9e\u73b0\u65b9\u6848\uff0c\u5e76\u4e0d\u5f71\u54cd\u539f\u6709\u7684\u91cd\u5206\u5e03\u6a21\u5f0f\u7684\u6570\u636e\u670d\u52a1\u66ff\u6362\u3002<\/p>\n\n\n\n<p>\u8be5\u65b9\u6cd5\u7684\u95ee\u9898\u662f\uff0c\u751f\u6210\u7684event\u4f1a\u5f88\u591a\uff0c\u65e0\u6cd5\u8c61\u91cd\u5206\u5e03\u6a21\u5f0f\u90a3\u6837\uff0c\u53ef\u4ee5\u76f8\u5bf9\u7cbe\u51c6\u901a\u8fc7\u5e76\u884c\u5ea6\uff0c\u63a7\u5236\u5bf9\u7cfb\u7edf\u73b0\u6709\u4e1a\u52a1\u7684\u5f71\u54cd\u3002<\/p>\n\n\n\n<p>\u8be5\u65b9\u6cd5\u7684\u4f18\u70b9\u662f\uff1a\u53ef\u4ee5\u5728\u6269\u5bb9\u91cd\u5206\u5e03\u4e00\u534a\u7684\u65f6\u5019\uff0c\u4f18\u5148\u5b8c\u6210\u8282\u70b9\u66ff\u6362\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>GBase 8a 953\u90e8\u5206\u7248\u672c\u65b0\u589e\u52a0\u4e86eventMode\u505a\u8282\u70b9\u66ff\u6362\u7684\u9009\u9879\u3002\u8be5\u9009\u9879\u4ec5\u7528\u4e8e\u6570\u636e\u670d\u52a1\u7684\u66ff\u6362\uff0c\u7ba1\u7406\u548c\u8c03\u5ea6\u670d\u52a1\u66ff\u6362\u7ef4\u6301\u539f\u72b6\uff0c\u539f\u6709\u7684\u91cd\u5206\u5e03\u6a21\u5f0f\u7684\u6570\u636e\u670d\u52a1\u66ff\u6362\u65b9\u6848\u4f9d\u65e7\u3002<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[89,60],"class_list":["post-13032","post","type-post","status-publish","format-standard","hentry","category-gbase8a","tag-89","tag-v95"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/13032","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/comments?post=13032"}],"version-history":[{"count":3,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/13032\/revisions"}],"predecessor-version":[{"id":13035,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/13032\/revisions\/13035"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=13032"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=13032"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=13032"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}