coolbeevip opened a new issue #435: Attribute types in class 
TxConsistentService wrong?
URL: https://github.com/apache/servicecomb-pack/issues/435
 
 
   ```java
   @EnableKamon
   public class TxConsistentService {
     private static final Logger LOG = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
   
     private final TxEventRepository eventRepository;
   
     private final List<String> types = Arrays.asList(TxStartedEvent.name(), 
SagaEndedEvent.name());
   
     public TxConsistentService(TxEventRepository eventRepository) {
       this.eventRepository = eventRepository;
     }
     @Segment(name = "handleTxEvent", category = "application", library = 
"kamon")
     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;
     }
   
     @Segment(name = "isGlobalTxAborted", category = "application", library = 
"kamon")
     private boolean isGlobalTxAborted(TxEvent event) {
       return !eventRepository.findTransactions(event.globalTxId(), 
TxAbortedEvent.name()).isEmpty();
     }
   }
   ```
    I think it is 
   ```java
   private final List<String> types = Arrays.asList(TxStartedEvent.name(), 
SagaStartedEvent.name());
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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