Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seata1.7.0 AT模式 对于日期为主键的表没有生成undolog,导致报错后无法回滚。 #7006

Open
1 task
songfz123 opened this issue Nov 15, 2024 · 0 comments

Comments

@songfz123
Copy link

songfz123 commented Nov 15, 2024

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

未生成undolog日志信息,也没有在lock_table表产生数据。以至于后续报错也不会回滚

Ⅱ. Describe what happened

有这么两张表,test_c 表为id主键表, test_d表为日期为主键表
CREATE TABLE test_c (
id bigint(22) NOT NULL AUTO_INCREMENT,
create_time datetime DEFAULT NULL,
test varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
PRIMARY KEY (id)
) AUTO_INCREMENT = 1000001 DEFAULT CHARSET = utf8mb4

CREATE TABLE test_d (
id bigint(22) NOT NULL AUTO_INCREMENT,
create_time datetime NOT NULL,
test varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
PRIMARY KEY (create_time)
) AUTO_INCREMENT = 1000001 DEFAULT CHARSET = utf8mb4

a服务调用b服务,而b服务中插入这两个表,两个表在同一个事务中。
image

image
当产生undolog时,只有test_c 表产生了日志,test_d 表未生成日志。
image
lock_table表也只产生了test_c 表的主键信息。

当a服务调用b服务结束后返回时,a服务抛出一个异常,此时只有test_c表会进行回滚,test_d表不会进行回滚。
image

Ⅲ. Describe what you expected to happen

我希望能让test_d表一起跟普通id主键表一样产生undolog,当出现后续异常时可以一起进行回滚事务。

Ⅳ. How to reproduce it (as minimally and precisely as possible)

代码参考上述截图,简单的测试,a服务通过feign调用b服务,b服务插入这两个表,调用返回后,a服务抛出异常即可复现。

Ⅴ. Anything else we need to know?

以上问题希望能够通过seata方面进行解决,目前出现问题的业务表在生产环境上数据量较大且不支持直接修改主键类型或修改索引类型。

Ⅵ. Environment:

  • JDK version(e.g. java -version): jdk1.8
  • Seata client/server version: v1.7.0
  • Database version: oceanBase数据库mysql模式 商业版本 3.2.2
  • OS(e.g. uname -a):
  • Others:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant