seanyinx commented on a change in pull request #122: SCB-239 omega stateless
URL: 
https://github.com/apache/incubator-servicecomb-saga/pull/122#discussion_r165661954
 
 

 ##########
 File path: 
alpha/alpha-core/src/main/java/org/apache/servicecomb/saga/alpha/core/TxConsistentService.java
 ##########
 @@ -40,11 +51,33 @@ public boolean handle(TxEvent event) {
       return false;
     }
 
+    if (isEventWithTimeout(event)) {
+      saveTxTimeout(event);
+    }
+
     eventRepository.save(event);
 
+    if (Arrays.asList(TxEndedEvent.name(), SagaEndedEvent.name(), 
TxAbortedEvent.name()).contains(event.type())) {
+      CompletableFuture.runAsync(() -> 
timeoutRepository.markTxTimeoutAsDone(event.globalTxId(), event.localTxId()));
 
 Review comment:
   this makes alpha stateful, which we try to avoid

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


With regards,
Apache Git Services

Reply via email to