-
Notifications
You must be signed in to change notification settings - Fork 278
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
AT模式事物隔离问题 #48
Comments
使用 select for update 查询库存,查询时,集成 seata 的 driver 会重试去 tc 上询问对应的数据是否被锁住,tc 释放了锁,select for update 从数据库获取到当前的库存数据。 |
本地锁和全局锁是如何申请和释放的 |
本地锁本地提交时释放,全局锁,全局提交、回滚成功后释放 |
luky116
pushed a commit
that referenced
this issue
Jul 12, 2022
feature append action context for tcc
wang1309
pushed a commit
to wang1309/seata-go
that referenced
this issue
Jan 7, 2023
feature append action context for tcc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
分布式事物由两个事物组成
1负责创建订单时扣减库存
2负责创建订单时写入订单主表和订单明细表
当1事物 commit 之后(库存减少了) , 2事物出错了需要回滚 , 全局回滚完成 之前, 这时读取的库存数是1事物commit之后的, 这种问题要怎么处理?
The text was updated successfully, but these errors were encountered: