This is an automated email from the ASF dual-hosted git repository.
tew pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-seata-go.git
The following commit(s) were added to refs/heads/master by this push:
new 6437e520 Connections leaks in resource manager (#1011)
6437e520 is described below
commit 6437e520047f0cfebdc408f62135c0a3d70b9310
Author: xuzifu666 <[email protected]>
AuthorDate: Tue Dec 2 19:22:56 2025 +0800
Connections leaks in resource manager (#1011)
fix: Connections leaks in resource manager
---
pkg/datasource/sql/xa_resource_manager.go | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pkg/datasource/sql/xa_resource_manager.go
b/pkg/datasource/sql/xa_resource_manager.go
index 96352783..f84097e9 100644
--- a/pkg/datasource/sql/xa_resource_manager.go
+++ b/pkg/datasource/sql/xa_resource_manager.go
@@ -166,6 +166,7 @@ func (xaManager *XAResourceManager) BranchCommit(ctx
context.Context, branchReso
if err != nil {
return branch.BranchStatusPhasetwoRollbackFailedUnretryable, err
}
+ defer connectionProxyXA.Close()
if err := connectionProxyXA.XaCommit(ctx, xaID); err != nil {
log.Errorf("commit xa, resourceId: %s, err %v",
branchResource.ResourceId, err)
@@ -183,6 +184,7 @@ func (xaManager *XAResourceManager) BranchRollback(ctx
context.Context, branchRe
if err != nil {
return branch.BranchStatusPhasetwoRollbackFailedUnretryable, err
}
+ defer connectionProxyXA.Close()
if err = connectionProxyXA.XaRollbackByBranchId(ctx, xaID); err != nil {
log.Errorf("rollback xa, resourceId: %s, err %v",
branchResource.ResourceId, err)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]