You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "CAICAIIs (via GitHub)" <gi...@apache.org> on 2026/03/02 09:17:00 UTC

[I] [Bug] Oracle XA connection panic prevents any Oracle database usage [incubator-seata-go]

CAICAIIs opened a new issue, #1056:
URL: https://github.com/apache/incubator-seata-go/issues/1056

   ### ✅ 验证清单
   
   - [x] 🔍 我已经搜索过 [现有 Issues](https://github.com/apache/incubator-seata-go/issues),确信这不是重复问题
   - [x] 🛠️ 我愿意自己处理这个议题
   
   ### 🚀 Go 版本
   
   1.20
   
   ### 📦 Seata-go 版本
   
   v2.0.0
   
   ### 💾 操作系统
   
   🍎 macOS
   
   ### 📝 Bug 描述
   
   The Oracle XA connection implementation in `pkg/datasource/sql/xa/oracle_xa_connection.go` has **5 methods that panic** with `"implement me"` instead of providing actual functionality. This makes Oracle XA mode completely unusable - any attempt to use Oracle database with XA distributed transactions will crash immediately.
   
   ### 🔄 重现步骤
   
   1
   
   ### ✅ 预期行为
   
   These 5 methods should implement the Oracle XA protocol operations:
   1. Forget(xid string) error: Remove heuristically completed transaction branch from Oracle
      - Execute: XA FORGET '{xid}'
   2. GetTransactionTimeout() time.Duration: Return current transaction timeout value
      - Return stored timeout value (default or configured)
   3. IsSameRM(resource XAResource) bool: Check if two XA resources point to same Oracle instance
      - Compare connection parameters (host, port, service name)
   4. Recover(flag int) []string: Return list of prepared transaction XIDs
      - Execute: XA RECOVER and parse results
   5. SetTransactionTimeout(duration time.Duration) bool: Set transaction timeout
      - Store timeout value for future use
   
   ### ❌ 实际行为
   
   All 5 methods panic with "implement me", making Oracle XA mode completely broken:
   func (c *OracleXAConn) Forget(xid string) error {
       // TODO implement me
       panic("implement me")
   }
   
   ### 💡 可能的解决方案
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] [Bug] Oracle XA connection panic prevents any Oracle database usage [incubator-seata-go]

Posted by "flypiggyyoyoyo (via GitHub)" <gi...@apache.org>.
flypiggyyoyoyo commented on issue #1056:
URL: https://github.com/apache/incubator-seata-go/issues/1056#issuecomment-3999282314

   Thanks for catching this! FYI there are more implement me stubs in other parts of the codebase too. We'd love to hear your thoughts on prioritization - feel free to bring this up at the next weekly meeting if you're interested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] [Bug] Oracle XA connection panic prevents any Oracle database usage [incubator-seata-go]

Posted by "CAICAIIs (via GitHub)" <gi...@apache.org>.
CAICAIIs commented on issue #1056:
URL: https://github.com/apache/incubator-seata-go/issues/1056#issuecomment-4131119889

   1. XA 链路从驱动注册、DBType 识别到二阶段提交流程都仍然带有明显的 MySQL 假设:代码只声明并注册了 seata-at-mysql 与 seata-xa-mysql,没有任何 seata-*-oracle 驱动入口,同一文件里目标驱动被固定成 mysql.MySQLDriver{} 且 getTargetDriverName() 直接返回 "mysql",说明注册链路并未做多数据库抽象。而且 ParseDBType 的 switch 仅处理 "mysql",其余全部落到 DBTypeUnknown
   2. Oracle 在 Go 侧的底层 XA 路径也还没有验证打通:XA 资源工厂对 DBTypeOracle 分支是空实现,OracleXAConn 里还存在多个 panic("implement me"),并且其方法签名与 XAResource 接口不一致


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] [Bug] Oracle XA connection panic prevents any Oracle database usage [incubator-seata-go]

Posted by "CAICAIIs (via GitHub)" <gi...@apache.org>.
CAICAIIs closed issue #1056: [Bug] Oracle XA connection panic prevents any Oracle database usage
URL: https://github.com/apache/incubator-seata-go/issues/1056


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] [Bug] Oracle XA connection panic prevents any Oracle database usage [incubator-seata-go]

Posted by "CAICAIIs (via GitHub)" <gi...@apache.org>.
CAICAIIs commented on issue #1056:
URL: https://github.com/apache/incubator-seata-go/issues/1056#issuecomment-4038484564

   发现现有 XA 链路从驱动注册、DBType 识别到二阶段提交流程都仍然带有明显的 MySQL 假设,同时 Oracle 在 Go 侧的底层 XA 路径也还没有验证打通,所以现在无法在 PR #1057  基础上直接实现。如果实现可以参考以下大致路线方案:
   
   1. 先重构 XA 的公共框架
      - 先把当前偏 MySQL 的 XA 主流程,改成可按不同数据库挂接不同实现的结构。
   2. 把现有 MySQL XA 迁移到新框架里
      - 先保证 MySQL 现有能力不变,验证新框架本身是稳的。
   3. 补上数据库能力说明
      - 明确每种数据库分别支持什么:
      - 是否支持两阶段提交、是否支持 recover、是否要求绑定同一连接、错误语义是否一致。
   4. 先验证 Oracle 在 Go 里有没有真正可行的实现路径
      - 先做小范围验证,确认驱动、连接管理、提交/回滚、recover 链路是否真的能走通。
   5. 单独实现 PostgreSQL 的两阶段提交方案
      - 不直接照搬 MySQL XA,而是按 PostgreSQL 自己的两阶段提交机制单独实现。
   6. 如果 Oracle 路线验证通过,再正式补 Oracle 支持
      - 把 Oracle 做成独立实现,不混在 MySQL 逻辑里。
   7. 最后补完整测试
      - 补正常提交、正常回滚、异常中断、恢复处理、跨连接二阶段处理这些测试。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] [Bug] Oracle XA connection panic prevents any Oracle database usage [incubator-seata-go]

Posted by "CAICAIIs (via GitHub)" <gi...@apache.org>.
CAICAIIs commented on issue #1056:
URL: https://github.com/apache/incubator-seata-go/issues/1056#issuecomment-3999326041

   > Thanks for catching this! FYI there are more implement me stubs in other parts of the codebase too. We'd love to hear your thoughts on prioritization - feel free to bring this up at the next weekly meeting if you're interested.
   
   Thanks for the heads up! I'll take a look at the other stubs and come prepared to discuss prioritization at the weekly meeting.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] [Bug] Oracle XA connection panic prevents any Oracle database usage [incubator-seata-go]

Posted by "thunguo (via GitHub)" <gi...@apache.org>.
thunguo commented on issue #1056:
URL: https://github.com/apache/incubator-seata-go/issues/1056#issuecomment-4038605216

   > 发现现有 XA 链路从驱动注册、DBType 识别到二阶段提交流程都仍然带有明显的 MySQL 假设,同时 Oracle 在 Go 侧的底层 XA 路径也还没有验证打通,所以现在无法在 PR [#1057](https://github.com/apache/incubator-seata-go/pull/1057) 基础上直接实现。如果实现可以参考以下大致路线方案:
   > 
   > 1. 先重构 XA 的公共框架
   >    
   >    * 先把当前偏 MySQL 的 XA 主流程,改成可按不同数据库挂接不同实现的结构。
   > 2. 把现有 MySQL XA 迁移到新框架里
   >    
   >    * 先保证 MySQL 现有能力不变,验证新框架本身是稳的。
   > 3. 补上数据库能力说明
   >    
   >    * 明确每种数据库分别支持什么:
   >    * 是否支持两阶段提交、是否支持 recover、是否要求绑定同一连接、错误语义是否一致。
   > 4. 先验证 Oracle 在 Go 里有没有真正可行的实现路径
   >    
   >    * 先做小范围验证,确认驱动、连接管理、提交/回滚、recover 链路是否真的能走通。
   > 5. 单独实现 PostgreSQL 的两阶段提交方案
   >    
   >    * 不直接照搬 MySQL XA,而是按 PostgreSQL 自己的两阶段提交机制单独实现。
   > 6. 如果 Oracle 路线验证通过,再正式补 Oracle 支持
   >    
   >    * 把 Oracle 做成独立实现,不混在 MySQL 逻辑里。
   > 7. 最后补完整测试
   >    
   >    * 补正常提交、正常回滚、异常中断、恢复处理、跨连接二阶段处理这些测试。
   
   我们周会讨论一下这块内容👍


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org