Richhardbranson edited a comment on issue #643: 分布式事务优雅shut down服务问题 URL: https://github.com/apache/servicecomb-pack/issues/643#issuecomment-605843124 服务A call 服务B 服务B代码 如下: ``` java @Transactional @Compensable(compensationMethod = "cancel",retries=5) @Override @DtIdempotent public void updateUserCoinWallet(UpdateUserCoinWalletReq req) { logger.error("钱包【uid={},coinId={}】,begin" + "更新钱包,globalTxId={}", req.getUid(),req.getCoinId(),req.getGlobalTxId()) ; List<String> keys = new ArrayList<>(); List<Object> argList = new ArrayList<>(); ... ... } @Transactional @DtIdempotent public void cancel(UpdateUserCoinWalletReq req) { logger.error("钱包【uid={},coinId={}】,撤销更新,globalTxId={}", req.getUid(),req.getCoinId(),req.getGlobalTxId()) ; List<String> keys = new ArrayList<>(); List<String> argList = new ArrayList<>(); ... ... } ``` 服务A中通过SagaStart注解 启动saga事务管理。 服务B 只配置一个实例,在进行重启的时候(启动时长约1分钟) ,重启完成后发现部分事务没有补偿成功。 这种情况是否在服务B端有什么处理机制需要做改进,避免这种情况发生。
---------------------------------------------------------------- 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
