-
Notifications
You must be signed in to change notification settings - Fork 846
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
对更新单行记录的优化如何保证幂等? #99
Comments
执行绑定参数变量 Line 4062 in 13502c1
执行UPDATE操作 #L3456 Line 3485 in 13502c1
执行INSERT操作 #L3611 Line 3634 in 13502c1
外层兜底 #L6616 Line 6619 in 13502c1
从代码看,这个直接调用了commit/rollback,结束了事务,那么幂等流水是什么时间写的呢,INSERT幂等流水和UPDATE库存不在一个事务里,是如何保证幂等的呢? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/alibaba/AliSQL/wiki/Changes-in-AliSQL-5.6.32-(2016-10-14)
https://github.com/alibaba/AliSQL/wiki/AliSQL-Performance-benchmark-for-inventory
https://github.com/alibaba/AliSQL/wiki/alisql_ic.lua
看到这里根据hint可以自动提交,但是如何保证幂等性,最简化的做法是根据订单查询流水,如果没有流水则INSERT订单,UPDATE库存,INSERT+UPDATE是在一个事务,订单通过唯一键约束,但是这里更新库存直接提交了,怎么确保是否应该提交,是否是订单重入的请求?
The text was updated successfully, but these errors were encountered: