This is an automated email from the ASF dual-hosted git repository.

wangxin pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new fe9a71d   fix #330 [blog] update Fescar `undo_log` table meta and 
ignore .iml (#331)
fe9a71d is described below

commit fe9a71de9624424430951008ba4ba1cec93cf26b
Author: jimin <jimin...@alibaba-inc.com>
AuthorDate: Sat Mar 16 21:30:35 2019 +0800

     fix #330 [blog] update Fescar `undo_log` table meta and ignore .iml (#331)
    
    * add doc How to use Fescar to ensure consistency between Dubbo 
Microservices
    * fix #330 [blog] update Fescar `undo_log` table meta and ignore .iml
---
 .gitignore                 | 1 +
 blog/en-us/dubbo-fescar.md | 7 ++++---
 blog/zh-cn/dubbo-fescar.md | 7 ++++---
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/.gitignore b/.gitignore
index f538a9d..7a04d2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ node_modules/
 npm-debug.log
 *.orig
 package-lock.json
+*.iml
\ No newline at end of file
diff --git a/blog/en-us/dubbo-fescar.md b/blog/en-us/dubbo-fescar.md
index fd68f49..75736f8 100644
--- a/blog/en-us/dubbo-fescar.md
+++ b/blog/en-us/dubbo-fescar.md
@@ -149,11 +149,12 @@ dubbo-storage-service.xml
     <property name="username" value="xxx" />
     <property name="password" value="xxx" />
 ```
-### Step 2: Create UNDO_LOG table for Fescar
+### Step 2: Create undo_log table for Fescar
 
 `UNDO_LOG` table is required by Fescar AT mode.
 
 ```sql
+-- Note that when Fescar version is upgraded to 0.3.0+, it is changed from the 
previous normal index to the unique index.
 CREATE TABLE `undo_log` (
   `id` bigint(20) NOT NULL AUTO_INCREMENT,
   `branch_id` bigint(20) NOT NULL,
@@ -164,8 +165,8 @@ CREATE TABLE `undo_log` (
   `log_modified` datetime NOT NULL,
   `ext` varchar(100) DEFAULT NULL,
   PRIMARY KEY (`id`),
-  KEY `idx_unionkey` (`xid`,`branch_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=159 DEFAULT CHARSET=utf8
+  UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
 ```
 
 ### Step 3: Create tables for example business
diff --git a/blog/zh-cn/dubbo-fescar.md b/blog/zh-cn/dubbo-fescar.md
index 2dd2bb3..b61afc4 100644
--- a/blog/zh-cn/dubbo-fescar.md
+++ b/blog/zh-cn/dubbo-fescar.md
@@ -149,11 +149,12 @@ dubbo-storage-service.xml
     <property name="username" value="xxx" />
     <property name="password" value="xxx" />
 ```
-### Step 2: 为 Fescar 创建 UNDO_LOG 表
+### Step 2: 为 Fescar 创建 undo_log 表
 
 `UNDO_LOG` 此表用于 Fescar 的AT模式。
 
 ```sql
+-- 注意当 Fescar 版本升级至 0.3.0+ 将由之前的普通索引变更为唯一索引。
 CREATE TABLE `undo_log` (
   `id` bigint(20) NOT NULL AUTO_INCREMENT,
   `branch_id` bigint(20) NOT NULL,
@@ -164,8 +165,8 @@ CREATE TABLE `undo_log` (
   `log_modified` datetime NOT NULL,
   `ext` varchar(100) DEFAULT NULL,
   PRIMARY KEY (`id`),
-  KEY `idx_unionkey` (`xid`,`branch_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=159 DEFAULT CHARSET=utf8
+  UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
 ```
 
 ### Step 3: 创建相关业务表

Reply via email to