incubator-seata-go icon indicating copy to clipboard operation
incubator-seata-go copied to clipboard

Go Implementation For Seata

Results 125 incubator-seata-go issues
Sort by recently updated
recently updated
newest added

优化系统性能,可以参考MOSN的设计 **What happened**: **What you expected to happen**: **How to reproduce it (as minimally and precisely as possible)**: **Anything else we need to know?**:

enhancement

**What this PR does**: **Which issue(s) this PR fixes**: Fixes #662 **Special notes for your reviewer**: **Does this PR introduce a user-facing change?**: ```release-note ```

milestone
coding
protocol
remoting
rm
integration
tm
ci/cd

**What this PR does**: support discovery by redis **Special notes for your reviewer**: I had tested and passed the unit test by the local redis server

coding

**What this PR does**: `pkg/database/sql/xa_resource_manager.go, xaTwoPhaseTimeoutChecker()` 在xa 二阶段timeout时,(默认是1秒,https://github.com/apache/incubator-seata-go/blob/master/pkg/datasource/sql/xa_resource_manager.go#L54), 会强制关闭本地数据库conn https://github.com/apache/incubator-seata-go/blob/master/pkg/datasource/sql/xa_resource_manager.go#L105。比如我们的业务逻辑sql,执行时间超过了1秒(xa 二阶段timeout 时间)。 而原来的流程不会因为conn 已经被关闭了,就做出相应响应。而是不断地尝试Commit (正常业务逻辑sql执行完,就需要xa commit, https://github.com/apache/incubator-seata-go/blob/master/pkg/datasource/sql/conn_xa.go#L211), 然后因为commit 失败,不断尝试 Rollback。 但是此时因为原来的db conn 已经完全关闭了, https://github.com/apache/incubator-seata-go/blob/master/pkg/datasource/sql/conn_xa.go#L378,本地RM的xa 事务已经完全丢失了,xid也在数据库里找不到了,此时就不停地报错 `XAER_NOTA: Unknown XID`. 这个PR,在每次XA commit/rollback...

coding

用这个patch模拟耗时sql查询,然后提前timeout的场景。 使用的是samples里的XA basic的代码 [test-timeout.patch](https://github.com/apache/incubator-seata-go/files/14480867/test-timeout.patch) ``` diff --git a/pkg/datasource/sql/conn_xa.go b/pkg/datasource/sql/conn_xa.go index f557c1e..8625f9e 100644 --- a/pkg/datasource/sql/conn_xa.go +++ b/pkg/datasource/sql/conn_xa.go @@ -199,6 +199,7 @@ func (c *XAConn) createNewTxOnExecIfNeed(ctx context.Context, f func() (types.Ex // execute...