thunguo opened a new issue, #1131: URL: https://github.com/apache/incubator-seata-go/issues/1131
### ✅ 验证清单 - [x] 🔍 我已经搜索过 [现有 Issues](https://github.com/apache/incubator-seata-go/issues),确信这不是重复请求 - [x] 📋 我已经查看了 [发布说明](https://github.com/apache/incubator-seata-go/releases),确信此功能尚未实现 - [ ] 🛠️ 我愿意自己处理这个议题 ### 🎯 功能描述 很多生产环境的表使用复合(多列)主键而非单一主键列(例如 `(tenant_id, id)`、`(order_id, user_id)`)。AT 模式目前已经为复合主键做了一些基础铺垫(例如支持跨多个主键列构建锁 key),但在不同的 SQL 执行器(INSERT、UPDATE、DELETE、INSERT ... ON DUPLICATE KEY UPDATE、SELECT ... FOR UPDATE)之间,支持并不完整、也不一致,尤其是在主键元数据处理和自动生成主键的场景中。 本 Issue 希望对 AT 模式所有相关执行器做一次系统性梳理和完善,确保使用复合主键的表能够完整、一致地支持: - 前/后镜像构建; - 锁 key 生成; - 回滚日志构建与回滚正确性。 ### 📋 使用场景 - 使用 `(tenant_id, id)` 这类复合主键的多租户系统; - 使用复合主键而非单列代理主键设计的关联表/中间表等场景。 ### ⚖️ 复杂性与风险评估 涉及大多数 AT 模式执行器共用的主键元数据处理逻辑,改动需要覆盖较全面的测试(insert/update/delete/select-for-update,以及与 Issue 3 中自增列、多行插入场景的交互),避免影响现有单主键场景的行为。 ### 🔗 外部依赖 _No response_ ### 📚 附加信息 _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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
