美文网首页
Seata之@GlobalTransactional验证

Seata之@GlobalTransactional验证

作者: Shaw_Young | 来源:发表于2020-10-06 13:38 被阅读0次

正常下单

http://localhost:2001/order/create?userId=1&productId=1&count=10&money=100


数据库情况


超时异常,没加@GlobalTransactional

AccountServiceImpl添加超时




数据库情况





故障情况

当库存和账户金额扣减后,订单状态并没有设置为已经完成,没有从0改成1
而且由于feign的重试机制,账户余额还有可能被多次扣减

超时异常,加@GlobalTransactional

AccountServiceImpl添加超时
OrderServiceImpl添加@GlobalTransactional



数据库情况




相关文章

网友评论

      本文标题:Seata之@GlobalTransactional验证

      本文链接:https://www.haomeiwen.com/subject/ziasdktx.html