servicecomb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] eric-lee-ltk commented on a change in pull request #122: SCB-239 omega stateless
Date Thu, 01 Jan 1970 00:00:00 GMT
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_r166640805
 
 

 ##########
 File path: alpha/alpha-core/src/main/java/org/apache/servicecomb/saga/alpha/core/EventScanner.java
 ##########
 @@ -64,16 +67,32 @@ public void run() {
   private void pollEvents() {
     scheduler.scheduleWithFixedDelay(
         () -> {
+          updateTimeoutStatus();
+          findTimeoutEvents();
+          abortTimeoutEvents();
           saveUncompensatedEventsToCommands();
           compensate();
           updateCompensatedCommands();
           deleteDuplicateSagaEndedEvents();
+          updateTransactionStatus();
         },
         0,
         eventPollingInterval,
         MILLISECONDS);
   }
 
+  private void findTimeoutEvents() {
+    eventRepository.findTimeoutEvents()
+        .forEach(event -> {
+          log.info("Found timeout event {}", event);
+          timeoutRepository.save(txTimeoutOf(event));
 
 Review comment:
   Yes, it will throw the integrity constraint violation exception when other alphas save
the same record in db just like the command behaves.

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


With regards,
Apache Git Services

Mime
View raw message