coolbeevip commented on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?
URL: 
https://github.com/apache/servicecomb-pack/issues/589#issuecomment-551369270
 
 
   以前我一直没有关注过前向恢复,我看了一下代码,如你所说前向恢复可能不会进行补偿,我看了一下前向恢复的类 
https://github.com/apache/servicecomb-pack/blob/9064e550c9b754bd61031dc3beae90a5ba34be75/omega/omega-transaction/src/main/java/org/apache/servicecomb/pack/omega/transaction/ForwardRecovery.java
 在方法调用前并没有发送 TxStartedEvent,只是在失败后会发送 TxAbortedEvent。
   
   而对于后台查询TxEvent表判断哪些子事务需要补偿时,好想必须找到 TxAbortedEvent 对应的 TxStartedEvent 
才会插入一个补偿命令到命令表 COMMAND
   
   至于为什么这么考虑,我也不确定这么做的理由,@WillemJiang 你可以看一下这个问题吗

----------------------------------------------------------------
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