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 2019/03/01 14:21:56 UTC

[GitHub] zhfeng commented on issue #416: 能否在一个方法上同时使用@SagaStart @Compensable以实现嵌套事务?

zhfeng commented on issue #416: 能否在一个方法上同时使用@SagaStart @Compensable以实现嵌套事务?
URL: https://github.com/apache/servicecomb-pack/issues/416#issuecomment-468680401
 
 
   yeah, I had done some works on this feature but did not prepare for a PR.
   
   The implementation I have is actually:
   1. When calling initializeOmegaContext(), it could check the current omega  context to see if there is already an globalTxId and to set the parentTxId with it.
   2. Add the X-Pack-Parent-Transaction-Id to propagate the parentTxId during the services.
   3. The alpha server will update to find the transactions with the parentTxId when rolling back the global transaction.
   4. Add and update the tests to work with the nested saga transactions.
       4.1 Test the global transaction and sub nested transactions are success.
       4.2 Test the one nested saga transaction is success and the other one is rolled back but the global transaction is success.
       4.3 Test the one nested saga transaction is success and the other one is rolled back but the global transaction is rolled back. It should roll back the success nested one.
   
   Anyway, I just finished work on the 1) and 2). I will be happy to see if you have any idea about this implementation and work together with me to support the nested saga in servicecomb-pack.
   
   Thanks

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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