wangwhs commented on issue #487: URL: https://github.com/apache/shardingsphere-elasticjob/issues/487#issuecomment-1984943880
> 用类似分布式锁方案,感觉有点重,且分布式锁要解决的是串行执行问题。而AbstractDistributeOnceElasticJobListener要解决的是只执行一次问题,要达到这个目标,类似分布式锁方案要考虑诸多意外情况(防止执行完后再次执行),逻辑比较复杂,且有几次zk交互,性能也有损耗。我还是倾向于用含有0号分片的实例执行,逻辑简单清晰,无多余zk操作。 英雄所见略同,哈哈哈。这个AbstractDistributeOnceElasticJobListener我看只是解决任务分片在不同节点上的同步问题,我也是指定第0个分片执行,解决单点执行问题,同时我也开启了失效转移来避免单点故障。 -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
