wy-140314 commented on issue #590: 事务失败后做补偿操作(cancel)抛异常,事务结束
URL: 
https://github.com/apache/servicecomb-pack/issues/590#issuecomment-552076896
 
 
   1.版本0.5.0,用的是saga-spring-demo,alpha没有使用状态机
    
https://github.com/apache/servicecomb-pack/blob/a89c7cd8b416c9b281fdbe28644cb6b7e2e78f91/omega/omega-context/src/main/java/org/apache/servicecomb/pack/omega/context/CallbackContext.java
   在apply方法中try catch住了cancel方法的异常,但是只打印了log,然后接着执行 sender.send(new 
TxCompensatedEvent(globalTxId, localTxId, parentTxId, compensationMethod));
   alpha收到TxCompensatedEvent后就更新command状态为dnwn增加sagaEndedEvent就结束事务了。
   
在整个过程中catch住了异常,但是接下来的处理逻辑和没有发生异常时是一样的。这样从数据记录就看不出补偿是否成功。不知道是不是我那里缺少配置造成的还是有其他的处理方式?
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to