incubator-seata-go
incubator-seata-go copied to clipboard
Go Implementation For Seata
内存池方案设计
优化系统性能,可以参考MOSN的设计 **What happened**: **What you expected to happen**: **How to reproduce it (as minimally and precisely as possible)**: **Anything else we need to know?**:
**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 ```
**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
**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...
用这个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...
**What this PR does**: This pull request integrates the Nacos registry center into the Seata-Go project. The integration includes the following functionalities: - **Service Registration**: Allows services to be registered...
请问执行update时候报这个错误,发现是缺少了dbname传入,这个问题有解决吗没,我看了去年都有issue提交了,显示已经被关闭,但是最新版本还是这个问题。
**What this PR does**: 解决tcc-fence无限回滚与无法解决悬挂问题 具体问题见链接:https://github.com/apache/incubator-seata-go-samples/issues/53 **Which issue(s) this PR fixes**: Fixes # **Special notes for your reviewer**: 此问题使tcc-fence模式下使用问题较大 **Does this PR introduce a user-facing change?**: ```release-note NONE ```
**What happened**: Tcc-fence模式下开启本地事务表后,无法正确处理空回滚,空回滚无限重试直至超时 **What you expected to happen**: 正确处理空回滚并插入挂起状态记录,防止悬挂 **How to reproduce it (as minimally and precisely as possible)**: 模拟空回滚,prepare时不插入记录 **Anything else we need to know?**: TCC-fence模式下空回滚无法正常消费,无限重试  此时在查询时,如果没有记录会返回报错 ...
**What this PR does**: fix action errors **Which issue(s) this PR fixes**: Fixes # https://github.com/apache/incubator-seata-go/issues/814 https://github.com/apache/incubator-seata-go/issues/832 **Special notes for your reviewer**: **Does this PR introduce a user-facing change?**: ```release-note ```