You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/08/30 07:33:51 UTC

[GitHub] HuZheting commented on issue #281: When TxEndedEvent comes after TxAbortedEvent, it would not be compensated?

HuZheting commented on issue #281: When TxEndedEvent comes after TxAbortedEvent, it would not be compensated?
URL: https://github.com/apache/incubator-servicecomb-saga/issues/281#issuecomment-417219596
 
 
   If you have receive a TxAbortEvent, the next TxStartedEvent with same globalTxId will be rejected.
   Look at the code in class TxConsistentService.
   
   `
   
       public boolean handle(TxEvent event) {
   
       if (types.contains(event.type()) && isGlobalTxAborted(event)) {
   
         LOG.info("Transaction event {} rejected, because its parent with globalTxId {} was already aborted",
             event.type(), event.globalTxId());
   
         return false;
   
       }
   
       eventRepository.save(event);
   
       return true;
   
        }
   
   
   `

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