{"id":9663,"date":"2024-01-17T17:34:43","date_gmt":"2024-01-17T09:34:43","guid":{"rendered":"https:\/\/nj.transwarp.cn:8180\/?p=9663"},"modified":"2026-09-10T10:30:01","modified_gmt":"2026-09-10T02:30:01","slug":"argodb%e9%94%81%e7%9a%84%e6%9f%a5%e7%9c%8b%e4%b8%8e%e9%87%8a%e6%94%be","status":"publish","type":"post","link":"https:\/\/kbwp.transwarp.cn\/?p=9663","title":{"rendered":"argodb\u9501\u7684\u67e5\u770b\u4e0e\u91ca\u653e"},"content":{"rendered":"<h3>\u6982\u8981\u63cf\u8ff0<\/h3>\n<hr \/>\n<p>argodb\u9501\u7684\u95ee\u9898\u6bd4\u8f83\u5e38\u89c1\uff0c\u6700\u5e38\u9047\u5230\u7684\u62a5\u9519\u5c31\u662f\u4e0b\u56fe\u4e2d\u7684\u62a5\u9519\uff0cneed wait lock holders:<strong><font color=magenta>xxx<\/font><\/strong>, id:<strong><font color=cyan>yyy<\/font><\/strong>, process lock conflict failed, check and do acquire write locks failed <\/p>\n<div style=\"box-shadow: 1px 1px 10px rgba(0,0,0,0.1); padding: 1px; display: inline-block; width: auto; margin-bottom: 10px;\">\n  <img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/01\/image-1769496902413.png\" style=\"display: block;\">\n<\/div>\n<h3>\u8be6\u7ec6\u4ecb\u7ecd<\/h3>\n<hr \/>\n<h3>\u4e00. \u5982\u4f55\u5224\u65ad\u8fd9\u4e2a\u4e8b\u52a1\u662f\u4ec0\u4e48\u5360\u7528\u7684\uff1f<\/h3>\n<p>\u62a5\u9519\u987e\u540d\u601d\u4e49\uff0c\u5f53\u524d\u4e8b\u52a1id\u4e3a yyy\uff0c\u9700\u8981\u7b49\u5f85\u4e8b\u52a1id\u4e3a xxx \u7684\u91ca\u653e\u6389 \u624d\u80fd\u7ee7\u7eed\u6267\u884c\u3002<\/p>\n<p>\u6b64\u65f6\u6211\u4eec\u53ef\u4ee5\u6839\u636e <strong>\u4e8b\u52a1id\u4e3axxx<\/strong> \u5728Query\u9875\u9762\u8fdb\u884c\u67e5\u8be2\uff0c\u627e\u5230\u5360\u7528\u9501\u7684sql\u8bed\u53e5\u3002<\/p>\n<div style=\"box-shadow: 1px 1px 10px rgba(0,0,0,0.1); padding: 1px; display: inline-block; width: auto; margin-bottom: 10px;\">\n  <img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/01\/image-1769497139413.png\" style=\"display: block;\">\n<\/div>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5982\u679c\u96c6\u7fa4\u5b89\u88c5\u4e86\u591a\u4e2aquark\/compactservice\uff0c\u90a3\u4e48\u6bcf\u4e2a\u90fd\u8981\u53bb\u67e5\u8be2\uff0c\u4e00\u822c\u90fd\u80fd\u591f\u627e\u5230\u5bf9\u5e94\u5360\u7528\u7684sql\u8bed\u53e5\u3002<\/p>\n<h3>\u4e8c. dbaservice\u9875\u9762\u627e\u4e0d\u5230\u600e\u4e48\u529e\uff1f<\/h3>\n<p>\u5982\u679c\u8fd8\u662f\u627e\u4e0d\u5230\uff0c\u53ef\u4ee5\u53c2\u8003\u5982\u4e0b\u4e24\u79cd\u65b9\u5f0f\u83b7\u53d6\u7ebf\u7d22\uff0c\u4ee5 <code>UPDATE dsy.SYS_SMS_BATCH SET XXDM=&#039;abcd&#039; WHERE ZJSJWYXBS = &#039;1&#039;<\/code> \u8fd9\u4e2asql\u4e3a\u4f8b\uff1a<\/p>\n<p><strong>a) \u767b\u5f55\u5230tddms master leader\u8282\u70b9\u6240\u5728\u540e\u53f0\u670d\u52a1\u5668\uff0c\u901a\u8fc7\u7c7b\u4f3c\u5982\u4e0b\u7684\u547d\u4ee4\u68c0\u7d22 master_main.INFO \u65e5\u5fd7<\/strong><\/p>\n<pre><code class=\"language-sql\">[root@kv2\/var\/log\/tddms1]> grep -E 'AcquireLocksProposal.*#140862' master_main.kv2.root.log.INFO.20260826-100830.1\nI20260910 09:18:41.375291    38 metadb.cc:222] fire callback for proposal:Name:AcquireLocksProposal:kMutate#140862#default#dsy.sys_sms_batch_d93381a3-4533-4e75-8be9-b532af95a679, IsAccepted:true, HasRpcContext:true\nI20260910 09:18:41.522189    38 metadb.cc:222] fire callback for proposal:Name:AcquireLocksProposal:kRead#140862#default#dsy.sys_sms_batch_d93381a3-4533-4e75-8be9-b532af95a679, IsAccepted:true, HasRpcContext:true<\/code><\/pre>\n<p>\u53ef\u4ee5\u770b\u5230\u8fd9\u4e2asql\u8bed\u53e5\uff0c\u5728 20260910 09:18:41 \u5de6\u53f3\uff0c\u5148\u540e\u83b7\u53d6\u4e86 Mutate \u548c Read \u9501\u3002\u7ed3\u5408 <a href=\"https:\/\/kb.transwarp.cn\/posts\/14343\" title=\"Argodb \u5e38\u89c1sql\u5bf9\u5e94\u7684\u9501\u7c7b\u578b\">Argodb \u5e38\u89c1sql\u5bf9\u5e94\u7684\u9501\u7c7b\u578b<\/a> \u80fd\u591f\u5927\u81f4\u5224\u65ad\u51fa\u662f\u6267\u884c\u4e86\u4ec0\u4e48sql\u8bed\u53e5\u89e6\u53d1\u7684\u3002<\/p>\n<p><strong>b) \u767b\u5f55\u5230dbaservice\u670d\u52a1\u8282\u70b9\u6240\u5728\u540e\u53f0\u670d\u52a1\u5668 $dbaservice.persistence.datadir \u76ee\u5f55\uff0c\u901a\u8fc7\u7c7b\u4f3c\u5982\u4e0b\u7684\u547d\u4ee4\u68c0\u7d22sql\u8bed\u53e5<\/strong><\/p>\n<pre><code class=\"language-shell\">[root@kv4\/mnt\/disk3\/dbaservice\/dbaservice2\/tmp\/preserve\/20260910]> ls -l\n\u603b\u7528\u91cf 12\ndrwxr-xr-x 9 root root 4096 9\u6708  10 00:01 argodbbar1@172.18.131.171:18898\ndrwxr-xr-x 8 root root 4096 9\u6708  10 09:19 compactservice1@172.18.131.171:4050\ndrwxr-xr-x 9 root root 4096 9\u6708  10 00:01 quark1@172.18.131.171:8888\n[root@kv4\/mnt\/disk3\/dbaservice\/dbaservice2\/tmp\/preserve\/20260910]> grep 140862 -R *<\/code><\/pre>\n<p>\u53ef\u4ee5\u770b\u5230\u5bf9\u5e94\u7684\u5b8c\u6574sql\uff1a<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/01\/image-1789007421708.png\" alt=\"file\" \/><\/p>\n<h3>\u4e09.\u5982\u4f55\u901a\u8fc7API\u83b7\u53d6\u9501\u4fe1\u606f\u5e76\u6740\u9501<\/h3>\n<pre><code class=\"language-shell\"># host\u4e3a TDDMS Webserver \u8282\u70b9\u7684ip \n# \u83b7\u53d6\u5f53\u524d\u96c6\u7fa4\u4e2d\u4e8b\u52a1\u4fe1\u606f\uff0c\u9ed8\u8ba4\u83b7\u53d6\u6d3b\u8dc3\u4e8b\u52a1\uff1a\ncurl -u shiva:shiva -XGET '<host>:<port>\/bulk_transaction?[pretty]'\n# \u5f3a\u5236\u7ec8\u6b62\u4e00\u4e2a\u6d3b\u8dc3\u4e8b\u52a1\uff1a\ncurl -u shiva:shiva -XDELETE \"<host>:<port>\/bulk_transaction\/<transaction_id>\"\n# \u53e6\u4e00\u79cd\u65b9\u6848\uff0cdbaservice \u4f1a\u8bdd\u9875\u9762\u5173\u95ed\u5360\u7528\u9501\u7684session\uff0c\u7b80\u5355\u7c97\u66b4<\/code><\/pre>\n<blockquote>\n<p>\u5982\u679c\u62a5\u9519 <code>NEGOTIATED_ROLE_NOT_EXIST<\/code>\uff0c\u9700\u8981\u52a0\u4e0a <code>-u shiva:shiva<\/code><\/p>\n<div style=\"box-shadow: 1px 1px 10px rgba(0,0,0,0.1); padding: 1px; display: inline-block; width: auto; margin-bottom: 10px;\">\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/01\/image-1733058939151.png\" style=\"display: block;\">\n<\/div>\n<\/blockquote>\n<h4>\u4e3e\u4f8b\u8bf4\u660e<\/h4>\n<h5>1\u3001\u521b\u5efa\u6d4b\u8bd5\u8868<\/h5>\n<pre><code class=\"language-sql\">DROP TABLE IF EXISTS EMP_HOLO;\nCREATE TABLE EMP_HOLO(\n       EMPNO int,\n       ENAME string,\n       JOB string,\n       MGR INT,\n       HIREDATE DATE,\n       SAL INT,\n       COMM INT,\n       DEPTNO INT\n)CLUSTERED BY (empno) INTO 3 BUCKETS\nSTORED AS HOLODESK;\nINSERT INTO EMP_HOLO VALUES (7369,'SMITH','CLERK',7902,tdh_todate('17-12-1980','dd-mm-yyyy'),800,NULL,20);<\/code><\/pre>\n<h5>2\u3001\u6267\u884c\u9501\u8bed\u53e5\uff0cdelete\u64cd\u4f5c<\/h5>\n<pre><code class=\"language-sql\">CREATE SEQUENCE test_seq\n      INCREMENT BY 1\n          START WITH 1\n          NOMAXVALUE\n          NOMINVALUE\n          NOCYCLE\n          CACHE 20;\n\nset transaction.type=holodesk;\n\nBEGIN\n       begin transaction;\n              --\u524d\u540e\u5206\u522b\u901a\u8fc7sequence\u503c\u6765\u6807\u8bb0\u6267\u884c\u987a\u5e8f\n              SELECT test_seq.NEXTVAL FROM system.dual;\n              --Action\n                    DELETE FROM EMP_HOLO WHERE ENAME ='SMITH';\n              --\u901a\u8fc7\u7761\u7720\u51fd\u6570\u63a7\u5236\u6267\u884c\u987a\u5e8f\n              dbms_lock.sleep(600);\n              --\u524d\u540e\u5206\u522b\u901a\u8fc7sequence\u503c\u6765\u6807\u8bb0\u6267\u884c\u987a\u5e8f\n              SELECT test_seq.NEXTVAL FROM system.dual;\n       commit;\nEND<\/code><\/pre>\n<p>\u6267\u884c\u4e0a\u8ff0plsql\u5757\u4e4b\u540e\uff0c\u4e00\u76f4\u5904\u4e8e\u8fd0\u884c\u72b6\u6001\u3002<\/p>\n<h5>3\u3001\u68c0\u67e5\u6d3b\u8dc3\u4e8b\u52a1\u4fe1\u606f\uff1a<\/h5>\n<p>\u53ef\u4ee5\u5728DBAService\u7684Query\u9875\u9762\uff0c\u83b7\u53d6\u5230 <strong>\u963b\u585e\u4e8b\u52a1id<\/strong> \uff0c\u518d\u7ed3\u5408delete \u8bf7\u6c42\u7ed3\u675f\u3002<\/p>\n<div style=\"box-shadow: 1px 1px 10px rgba(0,0,0,0.1); padding: 1px; display: inline-block; width: auto; margin-bottom: 10px;\">\n  <img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/01\/image-1751367937652.png\" style=\"display: block;\">\n<\/div>\n<p>\u901a\u8fc7 API \u4e5f\u53ef\u4ee5\u83b7\u53d6\u5230\u5f53\u524d\u6240\u6709\u6d3b\u8dc3\u7684\u4e8b\u52a1\u4fe1\u606f\uff1a<\/p>\n<pre><code class=\"language-shell\">[root@argodb1~]$ curl -u shiva:shiva -XGET '172.22.23.1:4567\/bulk_transaction?pretty'\n{\n  \"log_id\" : 1676003325746,\n  \"code\" : 0,\n  \"msg\" : \"ok\",\n  \"transaction_ids\" : [ 1493 ],\n  \"status\" : [ \"kActiveBulkTransaction\" ],\n  \"bulk_transaction_descriptions\" : [ {\n    \"id\" : 1493,\n    \"status\" : \"kActiveBulkTransaction\",\n    \"read_write_tables\" : [ {\n      \"table_id\" : 24,\n      \"bulk_loads\" : [ {\n        \"bulk_load_id\" : 1478,\n        \"section_names\" : [ \"default.emp_holo_3b71d992-e5b5-4bc2-940e-63233830e8cf\" ]\n      } ],\n      \"bulk_reads\" : [ {\n        \"section_name\" : \"default.emp_holo_3b71d992-e5b5-4bc2-940e-63233830e8cf\",\n        \"read_num\" : 2\n      } ],\n      \"schema_version\" : 3\n    } ],\n    \"policy_version\" : 0,\n    \"retain_si_read\" : false,\n    \"gcable\" : false,\n    \"creator\" : {\n      \"address\" : \"172.22.23.1:37463\",\n      \"log_id\" : 1676007619045\n    }\n  } ]\n}<\/code><\/pre>\n<p>\u8fd9\u4e2a\u56e0\u4e3a\u662f\u624b\u52a8\u5f00\u542f\u4e8b\u52a1\uff0c\u6240\u4ee5\u5728begin transaction\u7684\u65f6\u5019\u4e8b\u52a1ID\u5c31\u5df2\u7ecf\u786e\u5b9a\u4e86.<\/p>\n<h5>4\u3001\u624b\u52a8\u7ec8\u6b62\u4e8b\u52a1<\/h5>\n<p><strong>a. \u4ece\u524d\u9762\u7684\u7ed3\u679c\u53ef\u4ee5\u770b\u5230 <code>&quot;status&quot; : [ &quot;kActiveBulkTransaction&quot; ]<\/code>ACTIVE \u72b6\u6001\u7684\u8bdd\uff0c\u53ef\u4ee5\u901a\u8fc7\u4e0b\u9762\u7684\u65b9\u5f0f\u7ec8\u6b62\uff1a<\/strong><\/p>\n<pre><code class=\"language-shell\">\u5f3a\u884c\u7ed3\u675f\u4e8b\u52a1kActive\u72b6\u6001\u4e8b\u52a1\n# IP\u548cPORT\u6309\u7167tddms webui\n# curl -u shiva:shiva -XDELETE \"IP:PORT\/bulk_transaction\/<transaction_id>\"\ncurl -u shiva:shiva -XDELETE \"172.22.23.1:4567\/bulk_transaction\/1493\"\n{\"log_id\": 1676003325954,\"code\": 0,\"msg\": \"bulk transaction:1494 is aborted\"}<\/code><\/pre>\n<p><strong>b. \u5982\u679c\u4e8b\u52a1\u72b6\u6001\u662f <code>&quot;status&quot; : [ &quot;kWaitingBulkTransaction&quot; ]<\/code>  WAITING \u72b6\u6001\u7684\u8bdd\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u547d\u4ee4\u5f3a\u884c\u7ec8\u6b62<\/strong><\/p>\n<pre><code class=\"language-shell\">\u5f3a\u884c\u7ed3\u675f\u4e8b\u52a1kwaitting\u72b6\u6001\u4e8b\u52a1\n# IP\u548cPORT\u6309\u7167tddms webui\n# curl -u shiva:shiva -XPOST \"IP:PORT\/bulk_transaction\/terminate\/<transaction_id>\"\ncurl -u shiva:shiva -XPOST \"172.22.23.1:4567\/bulk_transaction\/terminate\/123788\"<\/code><\/pre>\n<p><strong>c. \u5982\u679c\u4e8b\u52a1\u72b6\u6001\u662f <code>&quot;status&quot; : [ &quot;kAbortedBulkTransaction&quot; ]<\/code>  ABORTED \u72b6\u6001\u7684\u8bdd\uff0c\u4ee3\u8868\u5df2\u7ec8\u6b62\u7684\u4e8b\u52a1\uff0c\u65e0\u987b\u5904\u7406<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981\u63cf\u8ff0 argodb\u9501\u7684\u95ee\u9898\u6bd4\u8f83\u5e38\u89c1\uff0c\u6700\u5e38\u9047\u5230\u7684\u62a5\u9519\u5c31\u662f\u4e0b\u56fe\u4e2d\u7684\u62a5\u9519\uff0cneed wait lock hold ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/kbwp.transwarp.cn\/?p=9663\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38],"tags":[],"class_list":["post-9663","post","type-post","status-publish","format-standard","hentry","category-configuration"],"acf":[],"_links":{"self":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/9663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9663"}],"version-history":[{"count":3,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/9663\/revisions"}],"predecessor-version":[{"id":19277,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/9663\/revisions\/19277"}],"wp:attachment":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}