From c7514277e598496eeefc91cf8a07e301cd2f0f20 Mon Sep 17 00:00:00 2001
From: yedf2 <120050102@qq.com>
Date: Thu, 14 Jul 2022 21:50:25 +0800
Subject: [PATCH 1/3] rename ResetXaData()
---
test/busi/data.go | 2 +-
test/busi/utils.go | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/test/busi/data.go b/test/busi/data.go
index 4927532..e5f8726 100644
--- a/test/busi/data.go
+++ b/test/busi/data.go
@@ -19,7 +19,7 @@ import (
// PopulateDB populate example mysql data
func PopulateDB(skipDrop bool) {
- resetXaData()
+ ResetXaData()
file := fmt.Sprintf("%s/busi.%s.sql", dtmutil.GetSQLDir(), BusiConf.Driver)
dtmutil.RunSQLScript(BusiConf, file, skipDrop)
file = fmt.Sprintf("%s/dtmcli.barrier.%s.sql", dtmutil.GetSQLDir(), BusiConf.Driver)
diff --git a/test/busi/utils.go b/test/busi/utils.go
index e30b463..c7afe3c 100644
--- a/test/busi/utils.go
+++ b/test/busi/utils.go
@@ -42,7 +42,8 @@ func txGet() *sql.Tx {
return tx
}
-func resetXaData() {
+// ResetXaData will rollback all pending xa transaction
+func ResetXaData() {
if BusiConf.Driver != "mysql" {
return
}
From 2c9ad59740cfbcc4a4b2c3529017a9287005bd26 Mon Sep 17 00:00:00 2001
From: yedf2 <120050102@qq.com>
Date: Tue, 19 Jul 2022 10:01:37 +0800
Subject: [PATCH 2/3] update readmes
---
README.md | 5 ++---
helper/README-cn.md | 2 ++
helper/README-en.md | 3 ++-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 5ce855d..1951fcc 100644
--- a/README.md
+++ b/README.md
@@ -11,12 +11,10 @@ English | [简体中文](https://github.com/dtm-labs/dtm/blob/main/helper/README
## What is DTM
-DTM is a distributed transaction framework which provides cross-service eventual data consistency. It provides saga, tcc, xa, 2-phase message, outbox patterns for a variety of application scenarios. It also supports multiple languages and multiple store engine to form up a transaction as following:
+DTM is a distributed transaction framework which provides cross-service eventual data consistency. It provides saga, tcc, xa, 2-phase message, outbox, workflow patterns for a variety of application scenarios. It also supports multiple languages and multiple store engine to form up a transaction as following:
-## Features
-
## Who's using DTM (partial)
[Tencent](https://en.dtm.pub/other/using.html#tencent)
@@ -92,6 +90,7 @@ The timing diagram for the intended failure is as follows:
## More examples
+If you want more quick start examples, please refer to [dtm-labs/quick-start-sample](https://github.com/dtm-labs/quick-start-sample)
The above example mainly demonstrates the flow of a distributed transaction. More on this, including practical examples of how to interface with an actual database, how to do compensation, how to do rollback, etc. please refer to [dtm-examples](https://github.com/dtm-labs/dtm-examples) for more examples.
diff --git a/helper/README-cn.md b/helper/README-cn.md
index 2153ae3..4fd5a8b 100644
--- a/helper/README-cn.md
+++ b/helper/README-cn.md
@@ -108,6 +108,8 @@ go run main.go
在转入操作失败的情况下,TransIn和TransOut的补偿操作被执行,保证了最终的余额和转账前是一样的。
### 更多示例
+关于更多quick start的例子,可以参考 [dtm-labs/quick-start-sample](https://github.com/dtm-labs/quick-start-sample)
+
上述示例主要演示了分布式事务的流程,更多的内容,包括如何与实际的数据库对接,如何做补偿,如何做回滚等实际的例子,请参考[dtm-labs/dtm-examples](https://github.com/dtm-labs/dtm-examples)
## 联系我们
diff --git a/helper/README-en.md b/helper/README-en.md
index 4caed84..1951fcc 100644
--- a/helper/README-en.md
+++ b/helper/README-en.md
@@ -11,7 +11,7 @@ English | [简体中文](https://github.com/dtm-labs/dtm/blob/main/helper/README
## What is DTM
-DTM is a distributed transaction framework which provides cross-service eventual data consistency. It provides saga, tcc, xa, 2-phase message, outbox patterns for a variety of application scenarios. It also supports multiple languages and multiple store engine to form up a transaction as following:
+DTM is a distributed transaction framework which provides cross-service eventual data consistency. It provides saga, tcc, xa, 2-phase message, outbox, workflow patterns for a variety of application scenarios. It also supports multiple languages and multiple store engine to form up a transaction as following:
@@ -90,6 +90,7 @@ The timing diagram for the intended failure is as follows:
## More examples
+If you want more quick start examples, please refer to [dtm-labs/quick-start-sample](https://github.com/dtm-labs/quick-start-sample)
The above example mainly demonstrates the flow of a distributed transaction. More on this, including practical examples of how to interface with an actual database, how to do compensation, how to do rollback, etc. please refer to [dtm-examples](https://github.com/dtm-labs/dtm-examples) for more examples.
From 36aed587cb3c6043044874e5dbed500fc7aba0f0 Mon Sep 17 00:00:00 2001
From: yedf2 <120050102@qq.com>
Date: Tue, 19 Jul 2022 10:08:35 +0800
Subject: [PATCH 3/3] update en readme
---
README.md | 16 ++++++++++++++++
helper/README-en.md | 16 ++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/README.md b/README.md
index 1951fcc..31f8140 100644
--- a/README.md
+++ b/README.md
@@ -25,6 +25,22 @@ DTM is a distributed transaction framework which provides cross-service eventual
[More](https://en.dtm.pub/other/using.html)
+## Features
+* Multiple languages support: SDK for Go, Java, PHP, C#, Python, Nodejs
+* Support for multiple transaction modes: SAGA, TCC, XA, Workflow, Outbox
+* Better Outbox: 2-phase messages, a more elegant solution than Outbox, support multi-databases
+* Multiple database transaction support: Mysql, Redis, MongoDB, Postgres, TDSQL, etc.
+* Support for multiple storage engines: Mysql (common), Redis (high performance), MongoDB (under planning)
+* Support for multiple microservices architectures: [go-zero](https://github.com/zeromicro/go-zero), go-kratos/kratos, polarismesh/polaris
+* Support for high availability and easy horizontal scaling
+
+## Application scenarios.
+DTM can be applied to data consistency issues in a large number of scenarios, here are a few common ones
+* [cache management](https://en.dtm.pub/app/cache.html): thoroughly guarantee the cache final consistency and strong consistency
+* [flash-sales to deduct inventory](https://en.dtm.pub/app/flash.html): in extreme cases, it is also possible to ensure that the precise inventory in Redis is exactly the same as the final order created, without the need for manual adjustment
+* [Non-monolithic order system](https://en.dtm.pub/app/order.html): Dramatically simplifies the architecture
+* [Event publishing/subscription](https://en.dtm.pub/practice/msg.html): better outbox model
+
## [Cook Book](https://en.dtm.pub)
## Quick start
diff --git a/helper/README-en.md b/helper/README-en.md
index 1951fcc..31f8140 100644
--- a/helper/README-en.md
+++ b/helper/README-en.md
@@ -25,6 +25,22 @@ DTM is a distributed transaction framework which provides cross-service eventual
[More](https://en.dtm.pub/other/using.html)
+## Features
+* Multiple languages support: SDK for Go, Java, PHP, C#, Python, Nodejs
+* Support for multiple transaction modes: SAGA, TCC, XA, Workflow, Outbox
+* Better Outbox: 2-phase messages, a more elegant solution than Outbox, support multi-databases
+* Multiple database transaction support: Mysql, Redis, MongoDB, Postgres, TDSQL, etc.
+* Support for multiple storage engines: Mysql (common), Redis (high performance), MongoDB (under planning)
+* Support for multiple microservices architectures: [go-zero](https://github.com/zeromicro/go-zero), go-kratos/kratos, polarismesh/polaris
+* Support for high availability and easy horizontal scaling
+
+## Application scenarios.
+DTM can be applied to data consistency issues in a large number of scenarios, here are a few common ones
+* [cache management](https://en.dtm.pub/app/cache.html): thoroughly guarantee the cache final consistency and strong consistency
+* [flash-sales to deduct inventory](https://en.dtm.pub/app/flash.html): in extreme cases, it is also possible to ensure that the precise inventory in Redis is exactly the same as the final order created, without the need for manual adjustment
+* [Non-monolithic order system](https://en.dtm.pub/app/order.html): Dramatically simplifies the architecture
+* [Event publishing/subscription](https://en.dtm.pub/practice/msg.html): better outbox model
+
## [Cook Book](https://en.dtm.pub)
## Quick start