You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by xi...@apache.org on 2020/12/15 15:53:55 UTC

[shardingsphere] branch master updated: Update transaction doc (#8634)

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

xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new eb5f6f9  Update transaction doc (#8634)
eb5f6f9 is described below

commit eb5f6f90ea7a0f15c926929ef49076228e59e67b
Author: Liang Zhang <te...@163.com>
AuthorDate: Tue Dec 15 23:53:27 2020 +0800

    Update transaction doc (#8634)
---
 .../shardingsphere-jdbc/configuration/props.en.md  |  2 +-
 .../usage/transaction/narayana.cn.md               | 21 ++++++-----
 .../usage/transaction/narayana.en.md               | 26 +++++++-------
 .../shardingsphere-proxy/configuration/props.en.md |  2 +-
 .../shardingsphere-proxy/usage/transaction.cn.md   | 42 +++++++++++-----------
 .../shardingsphere-proxy/usage/transaction.en.md   | 19 ++++------
 6 files changed, 51 insertions(+), 61 deletions(-)

diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/props.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/props.en.md
index d7fbe30..507e2bf 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/props.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/props.en.md
@@ -18,4 +18,4 @@ Apache ShardingSphere provides the way of property configuration to configure sy
 | max-connections-size-per-query (?) | int         | Max opened connection size for each query.                                                                                                                                                                                                                   | 1               |
 | check-table-metadata-enabled (?)   | boolean     | Whether validate table meta data consistency when application startup or updated.                                                                                                                                                                            | false           |
 | query-with-cipher-column (?)       | boolean     | Whether query with cipher column for data encrypt. User you can use plaintext to query if have.                                                                                                                                                              | true            |
-| transaction-manager-type (?)       | String      | ShardingSphere transaction manager type. Include: atomikos, narayana.                                                                                                                                                                                        | atomikos        |
+| transaction-manager-type (?)       | String      | Transaction manager type. Include: atomikos, narayana.                                                                                                                                                                                                       | atomikos        |
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/usage/transaction/narayana.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/usage/transaction/narayana.cn.md
index 0cff74d..1b755fa 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/usage/transaction/narayana.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/usage/transaction/narayana.cn.md
@@ -52,37 +52,36 @@ weight = 5
 </dependency>
 ```
 
-## 修改配置
+## 定制化配置项
 
 可以通过在项目的 classpath 中添加 `jbossts-properties.xml` 来定制化 Narayana 配置项。
 
 详情请参见[Narayana官方文档](https://narayana.io/documentation/index.html)。
 
-## 设置XA事务管理类型
-
-在Apache ShardingSphere 配置系统级配置中设置XA事务管理器类型。
+## 设置 XA 事务管理类型
 
 Yaml:
+
 ```yaml
 props:
   transaction-manager-type: narayana
 ```
 
-Spring-Boot:
+SpringBoot:
 
 ```yaml
 spring:
   shardingsphere:
     props:
-        transaction-manager-type: narayana
+      transaction-manager-type: narayana
 ```
 
-Spring-Namespace:
+Spring Namespace:
 
 ```xml
 <shardingsphere:data-source id="xxx" data-source-names="xxx" rule-refs="xxx">
-        <props>
-            <prop key="transaction-manager-type">narayana</prop>
-        </props>
+    <props>
+        <prop key="transaction-manager-type">narayana</prop>
+    </props>
 </shardingsphere:data-source>
-```
\ No newline at end of file
+```
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/usage/transaction/narayana.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/usage/transaction/narayana.en.md
index 8fb406f..90174e9 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/usage/transaction/narayana.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/usage/transaction/narayana.en.md
@@ -18,7 +18,7 @@ weight = 5
     <version>${shardingsphere.version}</version>
 </dependency>
 
-<!-- import if using XA transaction -->
+<!-- Import if using XA transaction -->
 <dependency>
     <groupId>org.apache.shardingsphere</groupId>
     <artifactId>shardingsphere-transaction-xa-core</artifactId>
@@ -52,38 +52,36 @@ weight = 5
 </dependency>
 ```
 
-## Update Configuration
+## Customize Configuration Items
 
-Developer can add `jbossts-properties.xml` in classpath of the application to customize Narayana configuration. 
-For detailed configuration rules.
+Add `jbossts-properties.xml` in classpath of the application to customize Narayana configuration.
 
 Please refer to [Narayana official documentation](https://narayana.io/documentation/index.html) for more details.
 
-## Config Transaction Manager Type
-
-Set the XA transaction manager type in the Apache ShardingSphere configuration system-level configuration.
+## Configure Transaction Manager Type
 
 Yaml:
+
 ```yaml
 props:
   transaction-manager-type: narayana
 ```
 
-Spring-Boot:
+SpringBoot:
 
 ```yaml
 spring:
   shardingsphere:
     props:
-        transaction-manager-type: narayana
+      transaction-manager-type: narayana
 ```
 
-Spring-Namespace:
+Spring Namespace:
 
 ```xml
 <shardingsphere:data-source id="xxx" data-source-names="xxx" rule-refs="xxx">
-        <props>
-            <prop key="transaction-manager-type">narayana</prop>
-        </props>
+    <props>
+        <prop key="transaction-manager-type">narayana</prop>
+    </props>
 </shardingsphere:data-source>
-```
\ No newline at end of file
+```
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/configuration/props.en.md b/docs/document/content/user-manual/shardingsphere-proxy/configuration/props.en.md
index f5190fb..09acb7e 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/configuration/props.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/configuration/props.en.md
@@ -23,4 +23,4 @@ Apache ShardingSphere provides the way of property configuration to configure sy
 | proxy-transaction-type (?)         | String      | Default transaction type of ShardingSphere-Proxy. Include: LOCAL, XA and BASE.                                                                                                                                                                               | LOCAL           |
 | proxy-opentracing-enabled (?)      | boolean     | Whether enable opentracing for ShardingSphere-Proxy.                                                                                                                                                                                                         | false           |
 | proxy-hint-enabled (?)             | boolean     | Whether enable hint for ShardingSphere-Proxy. Using Hint will switch proxy thread mode from IO multiplexing to per connection per thread, which will reduce system throughput.                                                                               | false           |
-| transaction-manager-type (?)       | String      | ShardingSphere transaction manager type. Include: atomikos, narayana.                                                                                                                                                                                        | atomikos        |
+| transaction-manager-type (?)       | String      | Transaction manager type. Include: atomikos, narayana.                                                                                                                                                                                                       | atomikos        |
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/usage/transaction.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/usage/transaction.cn.md
index 99accc5..b822e01 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/usage/transaction.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/usage/transaction.cn.md
@@ -8,52 +8,52 @@ ShardingSphere-Proxy 接入的分布式事务 API 同 ShardingSphere-JDBC 保持
 ## XA 事务
 
 * ShardingSphere-Proxy 原生支持 XA 事务,默认的事务管理器为 Atomikos。
-可以通过在 ShardingSphere-Proxy 的 conf 目录中添加 `jta.properties` 来定制化 Atomikos 配置项。
+可以通过在 ShardingSphere-Proxy 的 `conf` 目录中添加 `jta.properties` 来定制化 Atomikos 配置项。
 具体的配置规则请参考 Atomikos 的[官方文档](https://www.atomikos.com/Documentation/JtaProperties)。
 
 * 使用 Narayana事务管理器,需要参考以下步骤。
 
-步骤一:将 Narayana所需要的Jar包拷贝到 `/lib`。参考包如下:
+1. 将 Narayana 所需 jar 拷贝至 `/lib` 目录。参考如下:
 
 ```xml
 <propeties>
-        <narayana.version>5.9.1.Final</narayana.version>
-        <jboss-transaction-spi.version>7.6.0.Final</jboss-transaction-spi.version>
-        <jboss-logging.version>3.2.1.Final</jboss-logging.version>
+    <narayana.version>5.9.1.Final</narayana.version>
+    <jboss-transaction-spi.version>7.6.0.Final</jboss-transaction-spi.version>
+    <jboss-logging.version>3.2.1.Final</jboss-logging.version>
 </propeties>
 <dependency>
-      <groupId>org.jboss.narayana.jta</groupId>
-      <artifactId>jta</artifactId>
-      <version>${narayana.version}</version>
+    <groupId>org.jboss.narayana.jta</groupId>
+    <artifactId>jta</artifactId>
+    <version>${narayana.version}</version>
 </dependency>
 <dependency>
-       <groupId>org.jboss.narayana.jts</groupId>
-       <artifactId>narayana-jts-integration</artifactId>
-       <version>${narayana.version}</version>
+    <groupId>org.jboss.narayana.jts</groupId>
+    <artifactId>narayana-jts-integration</artifactId>
+    <version>${narayana.version}</version>
 </dependency>
 <dependency>
-       <groupId>org.jboss</groupId>
-       <artifactId>jboss-transaction-spi</artifactId>
-       <version>${jboss-transaction-spi.version}</version>
+    <groupId>org.jboss</groupId>
+    <artifactId>jboss-transaction-spi</artifactId>
+    <version>${jboss-transaction-spi.version}</version>
 </dependency>
 <dependency>
-       <groupId>org.jboss.logging</groupId>
-       <artifactId>jboss-logging</artifactId>
-       <version>${jboss-logging.version}</version>
+    <groupId>org.jboss.logging</groupId>
+    <artifactId>jboss-logging</artifactId>
+    <version>${jboss-logging.version}</version>
 </dependency>
 ``` 
  
-步骤二: 在`conf/server.yaml` 的属性配置中加入如下:
+2. 在 `conf/server.yaml` 中加入如下配置:
 
 ```yaml
 props:
    transaction-manager-type: narayana
 ```
 
-步骤三:  新增 `jbossts-properties.xml`文件来定制化 Narayana 配置项,它的加载路径顺序:`user.dir (pwd)` > `user.home` > `java.home` > `classpath`。
+3. 新增 `jbossts-properties.xml` 文件来定制化 Narayana 配置项,它的加载路径顺序:`user.dir (pwd)` > `user.home` > `java.home` > `classpath`。
 详情请参见[Narayana官方文档](https://narayana.io/documentation/index.html)。
 
 
-## BASE事务
+## BASE 事务
 
-BASE 目前没有集成至 ShardingSphere-Proxy 的二进制发布包中,使用时需要将实现了 `ShardingTransactionManager` SPI 的 jar 拷贝至 conf/lib 目录,然后切换事务类型为 BASE。
+BASE 目前没有集成至 ShardingSphere-Proxy 的二进制发布包中,使用时需要将实现了 `ShardingTransactionManager` SPI 的 jar 拷贝至 `conf/lib` 目录,然后切换事务类型为 BASE。
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/usage/transaction.en.md b/docs/document/content/user-manual/shardingsphere-proxy/usage/transaction.en.md
index ebdded5..9a576aa 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/usage/transaction.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/usage/transaction.en.md
@@ -11,9 +11,7 @@ Default XA transaction manager of ShardingSphere is Atomikos. Users can customiz
 
 * Use Narayana XA Transaction Manager。
 
-First:
-
-Copy the Jar package required by Narayana to '/lib'.The reference package is as follows :
+1. Copy the jar file required by Narayana to `conf/lib`. The reference package is as follows:
 
 ```xml
 <propeties>
@@ -41,24 +39,19 @@ Copy the Jar package required by Narayana to '/lib'.The reference package is as
        <artifactId>jboss-logging</artifactId>
        <version>${jboss-logging.version}</version>
 </dependency>
-``` 
- 
-Second:
+```
 
-config `transaction-manager-type` in `conf/server.yaml`:
+2. Configure `transaction-manager-type` in `conf/server.yaml`:
 
 ```yaml
 props:
-   transaction-manager-type: narayana
+  transaction-manager-type: narayana
 ```
 
-Third:  
-
-Developer can add `jbossts-properties.xml`  of the application to customize Narayana configuration. 
-This is the point where the search path is applied - user.dir (pwd), user.home, java.home, classpath.
+3. Add `jbossts-properties.xml` to customize Narayana configuration.
+The order of path loading is` user.dir (pwd)` > `user.home` > `java.home` > `classpath`.
 Please refer to [Narayana official documentation](https://narayana.io/documentation/index.html) for more details.
 
-
 ## BASE Transaction
 
 Since we have not packed the BASE implementation jar into ShardingSphere-Proxy, you should copy relevant jar which implement `ShardingTransactionManager` SPI to `conf/lib`, then switch the transaction type to `BASE`.