-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Seata SAGA模式提示:seata_state_machine_inst.PRIMARY #6489
Comments
方便提供下异常堆栈吗? |
是这个对吗? io.seata.common.exception.StoreException: Duplicate entry '172.23.0.244:8091:524592202459856896' for key 'seata_state_machine_inst.PRIMARY' |
Are you set |
Ⅰ. Issue Description
使用Seata时,SAGA模式。一个接口比如创建订单,前一个创建订单请求,由于特殊场景(比如在扣库存请求失败时库存服务重启,或者处理事务时服务重启)导致事务处理失败。后面的创建订单请求,无法正常进行事务处理,会提示状态机实例表(seata_state_machine_inst)主键冲突。理论上,一个新的请求,应该有一个全新的全局事务id(xid),为何会出现此问题?
Ⅱ. Describe what happened
If there is an exception, please attach the exception trace:
Ⅲ. Describe what you expected to happen
提示上面的错误,是使用seata时,使用了相同的全局事务id。导致了插入数据库表:seata_state_machine_inst,提示主键冲突。期望应该不会出现生成重复的全局事务id,能正常进行分布式事务处理。
Ⅳ. How to reproduce it (as minimally and precisely as possible)
Minimal yet complete reproducer code (or URL to code):
Ⅴ. Anything else we need to know?
希望可以解释一下出现这种问题的原因,在不升级seata版本的前提下,能够修复或者避免出现此类情况。
Ⅵ. Environment:
java -version
): 1.8uname -a
): Linux 4.19.91-26.al7.x86_64The text was updated successfully, but these errors were encountered: