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

 ##########
 File path: 
alpha/alpha-core/src/main/java/org/apache/servicecomb/saga/alpha/core/EventScanner.java
 ##########
 @@ -109,6 +113,19 @@ private void updateCompensationStatus(TxEvent event) {
     markSagaEnded(event);
   }
 
+  private void abortTimeoutEvent() {
+    eventRepository.findFirstTimeoutEventByIdGreaterThan(nextTimeoutEventId)
+    .ifPresent((TxEvent event) -> {
+      log.info("Found timeout event {}", event);
+      nextTimeoutEventId = event.id();
+      eventRepository.save(toTxAbortedEvent(event));
+    });
+  }
+
+  private void updateTransactionStatus() {
+    
eventRepository.findFirstAbortedGlobalTransaction().ifPresent(this::markGlobalTxEnd);
 
 Review comment:
   timeout event with only SagaStartedEvent or only SagaStartedEvent and 
TxStartedEvent doesn't have anything to compensate, but currently there's no 
way to mark the end of such tx
   

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


With regards,
Apache Git Services

Reply via email to