You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "owalimas (via GitHub)" <gi...@apache.org> on 2026/10/10 14:24:47 UTC

Re: [I] 针对于达梦的批量插入,目前分布式AT模式不支持分布式事务 [incubator-seata]

owalimas commented on issue #6517:
URL: https://github.com/apache/incubator-seata/issues/6517#issuecomment-6098490996

   我们在 Seata 1.8.0 的 AT 模式下,从 MySQL 切换到达梦后遇到批量插入异常,原 MySQL 环境正常。项目配置的 JDBC 驱动为 com.dameng:DmJdbcDriver18:8.1.1.193。通过 tk.mybatis 的 insertList 执行 INSERT INTO proj_user_auth_info (..., id, ...) VALUES (...), (...),每行 ID 均由 Java 提前生成并作为参数传入,但执行时报 dm.jdbc.driver.DMException: Invalid return into multi rows。同环境下,另一业务循环执行单行 INSERT、一次提交多条记录可以成功。查看 Seata 1.8.0 源码发现,AbstractConnectionProxy.prepareStatement(String sql) 在 AT 模式下对 INSERT 使用 prepareStatement(sql, pkNameArray) 请求返回主键列,怀疑与达梦多行 INSERT 的主键返回机制有关,但尚未通过直接 JDBC 对照测试确认。请问官方是否已知这个问题,是否有对应修复 PR、推荐的驱动版本或配置方案?对于每行主键均由应用提供的场景,是否可以避免请求返
 回主键,同时保留批量插入和完整的 AT 回滚能力?


-- 
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