{"id":21900,"date":"2024-01-02T17:11:23","date_gmt":"2024-01-02T17:11:23","guid":{"rendered":"https:\/\/server.hk\/blog\/21900\/"},"modified":"2024-11-14T10:25:20","modified_gmt":"2024-11-14T02:25:20","slug":"how-to-fix-mongodb-error-code-320-tenantmigrationconflict","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/21900\/","title":{"rendered":"\u5982\u4f55\u4fee\u5fa9MongoDB\u932f\u8aa4\u78bc &#8211; 320 &#8211; TenantMigrationConflict"},"content":{"rendered":"<h1 id=\"how-to-fix-mongodb-error-code-320-tenantmigrationconflict-MtBVjGFrNe\">\u5982\u4f55\u4fee\u5fa9MongoDB\u932f\u8aa4\u78bc &#8211; 320 &#8211; TenantMigrationConflict<\/h1>\n<p>MongoDB\u662f\u4e00\u500b\u6d41\u884c\u7684NoSQL\u6578\u64da\u5eab\uff0c\u63d0\u4f9b\u9ad8\u6027\u80fd\u3001\u53ef\u64f4\u5c55\u6027\u548c\u9748\u6d3b\u6027\u3002\u7136\u800c\uff0c\u50cf\u4efb\u4f55\u8edf\u4ef6\u4e00\u6a23\uff0c\u5b83\u53ef\u80fd\u6703\u9047\u5230\u9700\u8981\u89e3\u6c7a\u7684\u932f\u8aa4\u3002\u5176\u4e2d\u4e4b\u4e00\u4fbf\u662fMongoDB\u932f\u8aa4\u78bc &#8211; 320 &#8211; TenantMigrationConflict\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u5011\u5c07\u63a2\u8a0e\u9019\u500b\u932f\u8aa4\u7684\u542b\u7fa9\u4ee5\u53ca\u5982\u4f55\u4fee\u5fa9\u5b83\u3002<\/p>\n<h2 id=\"understanding-mongodb-error-code-320-tenantmigrationconflict-MtBVjGFrNe\">\u4e86\u89e3MongoDB\u932f\u8aa4\u78bc &#8211; 320 &#8211; TenantMigrationConflict<\/h2>\n<p>MongoDB\u932f\u8aa4\u78bc &#8211; 320 &#8211; TenantMigrationConflict\u767c\u751f\u5728\u79df\u6236\u9077\u79fb\u904e\u7a0b\u4e2d\u51fa\u73fe\u885d\u7a81\u7684\u60c5\u6cc1\u3002\u5728MongoDB\u4e2d\uff0c\u79df\u6236\u6307\u7684\u662f\u8207\u5176\u4ed6\u79df\u6236\u9694\u96e2\u7684\u908f\u8f2f\u6578\u64da\u5eab\u3002\u6bcf\u500b\u79df\u6236\u90fd\u6709\u81ea\u5df1\u7684\u4e00\u7d44\u96c6\u5408\u548c\u6587\u6a94\u3002<\/p>\n<p>\u5728\u5c07\u4e00\u500b\u79df\u6236\u5f9e\u4e00\u53f0\u4f3a\u670d\u5668\u9077\u79fb\u5230\u53e6\u4e00\u53f0\u4f3a\u670d\u5668\u6642\uff0cMongoDB\u6703\u78ba\u4fdd\u9077\u79fb\u904e\u7a0b\u7121\u7e2b\u9032\u884c\uff0c\u4e26\u4e14\u4e0d\u6703\u5f71\u97ff\u6578\u64da\u5eab\u7684\u53ef\u7528\u6027\u6216\u6027\u80fd\u3002\u7136\u800c\uff0c\u5982\u679c\u5728\u9077\u79fb\u904e\u7a0b\u4e2d\u51fa\u73fe\u885d\u7a81\uff0c\u4f8b\u5982\u5728\u6e90\u4f3a\u670d\u5668\u548c\u76ee\u6a19\u4f3a\u670d\u5668\u4e0a\u540c\u6642\u4fee\u6539\u4e86\u4e00\u500b\u6587\u6a94\uff0c\u5247\u6703\u5f15\u767cTenantMigrationConflict\u932f\u8aa4\u3002<\/p>\n<h2 id=\"resolving-mongodb-error-code-320-tenantmigrationconflict-MtBVjGFrNe\">\u89e3\u6c7aMongoDB\u932f\u8aa4\u78bc &#8211; 320 &#8211; TenantMigrationConflict<\/h2>\n<p>\u8981\u4fee\u5fa9TenantMigrationConflict\u932f\u8aa4\uff0c\u8acb\u6309\u7167\u4ee5\u4e0b\u6b65\u9a5f\u9032\u884c\uff1a<\/p>\n<h3 id=\"1-identify-the-source-of-conflict-MtBVjGFrNe\">1. \u78ba\u5b9a\u885d\u7a81\u7684\u4f86\u6e90<\/h3>\n<p>\u7b2c\u4e00\u6b65\u662f\u78ba\u5b9a\u885d\u7a81\u7684\u4f86\u6e90\u3002\u9019\u53ef\u4ee5\u901a\u904e\u6aa2\u67e5MongoDB\u65e5\u8a8c\u6216\u4f7f\u7528MongoDB\u547d\u4ee4\u884c\u754c\u9762\u4f86\u5b8c\u6210\u3002\u67e5\u627e\u8207\u9077\u79fb\u904e\u7a0b\u76f8\u95dc\u7684\u932f\u8aa4\u6216\u8b66\u544a\u3002<\/p>\n<h3 id=\"2-resolve-the-conflict-MtBVjGFrNe\">2. \u89e3\u6c7a\u885d\u7a81<\/h3>\n<p>\u4e00\u65e6\u78ba\u5b9a\u4e86\u885d\u7a81\u7684\u4f86\u6e90\uff0c\u60a8\u9700\u8981\u52a0\u4ee5\u89e3\u6c7a\u3002\u6839\u64da\u885d\u7a81\u7684\u6027\u8cea\uff0c\u60a8\u53ef\u4ee5\u63a1\u53d6\u5e7e\u7a2e\u4e0d\u540c\u7684\u65b9\u6cd5\uff1a<\/p>\n<ul>\n<li><strong>\u91cd\u8a66\u9077\u79fb\uff1a<\/strong>\u5982\u679c\u885d\u7a81\u662f\u7531\u65bc\u66ab\u6642\u6027\u554f\u984c\uff08\u5982\u7db2\u7d61\u6545\u969c\u6216\u4f3a\u670d\u5668\u6545\u969c\uff09\u9020\u6210\u7684\uff0c\u60a8\u53ef\u4ee5\u91cd\u8a66\u9077\u79fb\u3002MongoDB\u63d0\u4f9b\u5de5\u5177\u548c\u547d\u4ee4\u4f86\u6062\u5fa9\u4e2d\u65b7\u7684\u9077\u79fb\u3002<\/li>\n<li><strong>\u89e3\u6c7a\u6578\u64da\u885d\u7a81\uff1a<\/strong>\u5982\u679c\u885d\u7a81\u662f\u7531\u65bc\u5728\u6e90\u4f3a\u670d\u5668\u548c\u76ee\u6a19\u4f3a\u670d\u5668\u4e0a\u5c0d\u540c\u4e00\u6587\u6a94\u9032\u884c\u540c\u6642\u4fee\u6539\u800c\u9020\u6210\u7684\uff0c\u5247\u9700\u8981\u89e3\u6c7a\u6578\u64da\u885d\u7a81\u3002\u9019\u53ef\u4ee5\u901a\u904e\u624b\u52d5\u5408\u4f75\u8b8a\u66f4\u6216\u4f7f\u7528MongoDB\u5167\u7f6e\u7684\u885d\u7a81\u89e3\u6c7a\u6a5f\u5236\u4f86\u5b8c\u6210\u3002<\/li>\n<li><strong>\u6062\u5fa9\u5230\u6e90\u4f3a\u670d\u5668\uff1a<\/strong>\u5982\u679c\u885d\u7a81\u7121\u6cd5\u89e3\u6c7a\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u6062\u5fa9\u5230\u6e90\u4f3a\u670d\u5668\u4e26\u91cd\u65b0\u958b\u59cb\u9077\u79fb\u904e\u7a0b\u3002\u9019\u53ef\u80fd\u662f\u4e00\u500b\u8017\u6642\u7684\u904e\u7a0b\uff0c\u56e0\u6b64\u61c9\u8a72\u4f5c\u70ba\u6700\u5f8c\u7684\u624b\u6bb5\u3002<\/li>\n<\/ul>\n<h3 id=\"3-monitor-the-migration-MtBVjGFrNe\">3. \u76e3\u63a7\u9077\u79fb\u904e\u7a0b<\/h3>\n<p>\u89e3\u6c7a\u885d\u7a81\u4e4b\u5f8c\uff0c\u76e3\u63a7\u9077\u79fb\u904e\u7a0b\u4ee5\u78ba\u4fdd\u5176\u6210\u529f\u5b8c\u6210\u662f\u5f88\u91cd\u8981\u7684\u3002\u96a8\u6642\u95dc\u6ce8MongoDB\u65e5\u8a8c\uff0c\u4e26\u4f7f\u7528\u76e3\u63a7\u5de5\u5177\u4f86\u8ddf\u8e2a\u9077\u79fb\u7684\u9032\u5ea6\u3002<\/p>\n<h2 id=\"summary-MtBVjGFrNe\">\u7e3d\u7d50<\/h2>\n<p>MongoDB\u932f\u8aa4\u78bc &#8211; 320 &#8211; TenantMigrationConflict\u53ef\u80fd\u767c\u751f\u5728\u5c07\u79df\u6236\u5f9e\u4e00\u53f0\u4f3a\u670d\u5668\u9077\u79fb\u5230\u53e6\u4e00\u53f0\u4f3a\u670d\u5668\u7684\u904e\u7a0b\u4e2d\u3002\u8981\u4fee\u5fa9\u6b64\u932f\u8aa4\uff0c\u60a8\u9700\u8981\u78ba\u5b9a\u885d\u7a81\u7684\u4f86\u6e90\u4e26\u89e3\u6c7a\u5b83\u3002\u9019\u53ef\u80fd\u5305\u62ec\u91cd\u8a66\u9077\u79fb\u3001\u89e3\u6c7a\u6578\u64da\u885d\u7a81\u6216\u6062\u5fa9\u5230\u6e90\u4f3a\u670d\u5668\u3002\u76e3\u63a7\u9077\u79fb\u904e\u7a0b\u5c0d\u78ba\u4fdd\u5176\u6210\u529f\u5b8c\u6210\u81f3\u95dc\u91cd\u8981\u3002<\/p>\n<p>\u5982\u679c\u60a8\u9047\u5230MongoDB\u932f\u8aa4\u78bc &#8211; 320 &#8211; TenantMigrationConflict\u6216\u9700\u8981\u6709\u95dcMongoDB\u6258\u7ba1\u7684\u5e6b\u52a9\uff0c\u8acb\u8003\u616e<a href=\"https:\/\/server.hk\">Server.HK<\/a>\u3002\u6191\u85c9\u5176\u53ef\u9760\u548c\u9ad8\u6027\u80fd\u7684VPS\u6258\u7ba1\u89e3\u6c7a\u65b9\u6848\uff0c\u4ed6\u5011\u53ef\u4ee5\u5e6b\u52a9\u60a8\u514b\u670dMongoDB\u6311\u6230\uff0c\u78ba\u4fdd\u6578\u64da\u5eab\u64cd\u4f5c\u9806\u5229\u9032\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u4fee\u5fa9MongoDB\u932f\u8aa4\u78bc &#038;&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-21900","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21900","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=21900"}],"version-history":[{"count":2,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21900\/revisions"}],"predecessor-version":[{"id":23434,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21900\/revisions\/23434"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=21900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=21900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=21900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}