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

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

Chenhaoqing commented on a change in pull request #313: SCB-915:saga alpha 
event scanner optimization
URL: 
https://github.com/apache/incubator-servicecomb-saga/pull/313#discussion_r219466552
 
 

 ##########
 File path: 
alpha/alpha-core/src/main/java/org/apache/servicecomb/saga/alpha/core/CompositeOmegaCallbackRunner.java
 ##########
 @@ -54,4 +68,37 @@ public void compensate(TxEvent event) {
       throw e;
     }
   }
+
+  @Override
+  public List<TxEvent> compensateAllEvents(List<TxEvent> txEvents) {
+    List<TxEvent> resultTxEvents = new ArrayList<>();
+    for (TxEvent txEvent : txEvents) {
+      try {
+        LOG.info("compensating event with globalTxId: {} localTxId: {}", 
txEvent.globalTxId(),
+            txEvent.localTxId());
+        this.compensate(txEvent);
+        resultTxEvents.add(txEvent);
+      } catch (AlphaException ae) {
+        LOG.error("compensate event with globalTxId: {} localTxId: {} 
failed,error message is {}",
+            txEvent.globalTxId(), txEvent.localTxId(), ae);
+        break;
 
 Review comment:
   I think it would be better to continue executing the looping.

----------------------------------------------------------------
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:
[email protected]


> saga alpha event scanner optimization
> -------------------------------------
>
>                 Key: SCB-915
>                 URL: https://issues.apache.org/jira/browse/SCB-915
>             Project: Apache ServiceComb
>          Issue Type: Improvement
>            Reporter: FuChenGeng
>            Assignee: FuChenGeng
>            Priority: Major
>
> 1.the compensate logic for retry scenarios is not perfect, in some place it 
> do not considering retry scenarios.
> 2.do one compensation in one event scanner cycle,it mean that if there are 
> 1000 aborted event, it will cost at lest 500s to compensate it. And it has 
> some bugs like
> [https://github.com/apache/incubator-servicecomb-saga/issues/253]
> 3.all hot and cold data are in the same table
> 4. omega do not send every try event to alpha.omega do it's try logic by 
> itself.



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

Reply via email to