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/04/10 02:25:21 UTC

[GitHub] [servicecomb-pack] zhfeng commented on a change in pull request #432: [SCB-836] Update to support the nested SagaStart

zhfeng commented on a change in pull request #432: [SCB-836] Update to support the nested SagaStart
URL: https://github.com/apache/servicecomb-pack/pull/432#discussion_r273769481
 
 

 ##########
 File path: omega/omega-transaction/src/main/java/org/apache/servicecomb/pack/omega/transaction/SagaStartAspect.java
 ##########
 @@ -69,6 +69,9 @@ Object advise(ProceedingJoinPoint joinPoint, SagaStart sagaStart) throws Throwab
   }
 
   private void initializeOmegaContext() {
+    if (context.globalTxId() != null) {
+      context.setParentTxId(context.globalTxId());
+    }
 
 Review comment:
   No, I don't think so. The nested saga could be cancelled individually that means it should have the different the globalTxId.
   ```
   SagaStart (globalTxId = 1, localTxId = 1, parentTxId = null)
   Nested SagaStart (globalTxId = 2, localTxId = 1, parentTxId = 1)
   Cancel Nested Saga ( this could rollback the globalTxId = 2)
   Close Saga ( this could close the globalTxId = 1

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