pengyu0929 commented on issue #473: 使用Feign调用失败,显示global transaction has already aborted URL: https://github.com/apache/servicecomb-pack/issues/473#issuecomment-496773453 ` @Compensable(compensationMethod = "cancel", retries = 3, retryDelayInMilliseconds = 2000) @Override @Transactional public HotelBooking order(HotelBooking booking) { System.out.println(booking.getName() + " : 开始预定房间。。。"); int insert = hotelBookingMapper.insert(booking); int i = 1 / 0; System.out.println(booking.getName() + " : 预定房间成功,数量 : " + insert); return booking; }` 我在Hotel的方法中先insert,之后执行` int i = 1 / 0;`,最终重试后抛出`MySQLIntegrityConstraintViolationException: Duplicate entry '35' for key 'PRIMARY'`,这个对调用补偿方法有影响吗?
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
