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

数据库情况



超时异常,没加@GlobalTransactional
AccountServiceImpl添加超时


数据库情况



故障情况
当库存和账户金额扣减后,订单状态并没有设置为已经完成,没有从0改成1
而且由于feign的重试机制,账户余额还有可能被多次扣减
超时异常,加@GlobalTransactional
AccountServiceImpl添加超时
OrderServiceImpl添加@GlobalTransactional

数据库情况



网友评论