WindyDovs opened a new issue #635: 关于SAGA模式设计上的问题 URL: https://github.com/apache/servicecomb-pack/issues/635 基于 0.5.0 版本的 SAGA 注解功能,查看了 alpha server 的源码,发现是使用 EventScanner 进行定时扫描的,其中的内容包括超时处理,补偿处理等。 private void pollEvents() { scheduler.scheduleWithFixedDelay( () -> { // only pull the events when working in the master mode if(nodeStatus.isMaster()){ updateTimeoutStatus(); findTimeoutEvents(); abortTimeoutEvents(); saveUncompensatedEventsToCommands(); compensate(); updateCompensatedCommands(); deleteDuplicateSagaEndedEvents(); updateTransactionStatus(); } }, 0, eventPollingInterval, MILLISECONDS); } 个人对此处感觉比较迷惑,不知道是否没理解到位,特提出此咨询: 补偿操作中对 command 的 pending 状态设置后,若在发送补偿前 server 崩溃,重启后是否就无法恢复事务了? 对 txtimeout 表的操作同理,若刚把 TimeOut 表的记录设置为 PENDING,alpha挂掉,那么该超时事件可能永远无法处理? 此处的众多处理是根据 eventPollingInterval 进行轮询串行处理的,此处的处理每次只处理一个超时、补偿的操作,在出现较高并发,或存在某些补偿服务的调用时间过长时,是否会导致补偿操作的严重滞后?
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
