We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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:
执行绑定参数变量
AliSQL/sql/sql_prepare.cc
Line 4062 in 13502c1
执行UPDATE操作 #L3456
AliSQL/sql/sql_parse.cc
Line 3485 in 13502c1
执行INSERT操作 #L3611
Line 3634 in 13502c1
外层兜底 #L6616
Line 6619 in 13502c1
从代码看,这个直接调用了commit/rollback,结束了事务,那么幂等流水是什么时间写的呢,INSERT幂等流水和UPDATE库存不在一个事务里,是如何保证幂等的呢?
Sorry, something went wrong.
No branches or pull requests
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: