You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/03/07 11:35:49 UTC

[GitHub] [servicecomb-pack] coolbeevip commented on issue #636: 我看了一下设计文档,对 sagas 流程有一点疑问

coolbeevip commented on issue #636: 我看了一下设计文档,对 sagas 流程有一点疑问
URL: https://github.com/apache/servicecomb-pack/issues/636#issuecomment-596079062
 
 
   正如 @WillemJiang 所说每个服务的方法中需要保证自身的原子事务(例如C服务的方法中使用数据库事务)
   
   如果你的C方法中无法保证原子事务(例如:C方法就是负责发送一个邮件),那么就需要额外的方式处理,例如在A方法中检测到异常后判断如果C方法出现异常则再补发有一个邮件 :(,此时可能无法判断C服务的异常是在邮件发送成功前还是成功后(也许你需要更多的步骤解决这个问题)
   
   或许我们可以通过一种机制,让A服务捕获到异常时能够知道整个事务链的状态,从而做一些额外的处理 cc @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:
users@infra.apache.org


With regards,
Apache Git Services