[ 
https://issues.apache.org/jira/browse/SCB-227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16326234#comment-16326234
 ] 

ASF GitHub Bot commented on SCB-227:
------------------------------------

seanyinx commented on a change in pull request #114: SCB-227 stop sub tx from 
running when global tx failed
URL: 
https://github.com/apache/incubator-servicecomb-saga/pull/114#discussion_r161516895
 
 

 ##########
 File path: 
omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/TransactionAspect.java
 ##########
 @@ -57,7 +59,13 @@ Object advise(ProceedingJoinPoint joinPoint, Compensable 
compensable) throws Thr
     context.newLocalTxId();
 
     TimeAwareInterceptor interceptor = new 
TimeAwareInterceptor(this.interceptor);
-    interceptor.preIntercept(localTxId, signature, joinPoint.getArgs());
+    AlphaResponse response = interceptor.preIntercept(localTxId, signature, 
joinPoint.getArgs());
+    if (response.aborted()) {
+      String abortedLocalTxId = context.localTxId();
+      context.setLocalTxId(localTxId);
+      throw new InvalidTransactionException("Abort local sub transaction " + 
abortedLocalTxId +
 
 Review comment:
   local transaction is sub transaction, "Aborted sub transaction... because 
global transaction ..."

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


> [pack] stop sub transaction from running when global tx failed
> --------------------------------------------------------------
>
>                 Key: SCB-227
>                 URL: https://issues.apache.org/jira/browse/SCB-227
>             Project: Apache ServiceComb
>          Issue Type: New Feature
>          Components: Saga
>            Reporter: Yin Xiang
>            Assignee: Eric Lee
>            Priority: Major
>
> sub transactions may be started in parallel among multiple services.
> if one of them failed, none of them shall start at all, if not already 
> started.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to