Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

任务有多次重复执行风险 #66

Open
zhouyg opened this issue Apr 5, 2021 · 2 comments
Open

任务有多次重复执行风险 #66

zhouyg opened this issue Apr 5, 2021 · 2 comments

Comments

@zhouyg
Copy link

zhouyg commented Apr 5, 2021

Please Desc Your Question
StartRun()中有加锁、执行任务、释放锁的操作。
如果运行多个调度节点,虽然有锁作为互斥,但也可能执行多次。
例如,调度节点a,获取锁后执行任务1(假如执行10ms),接着释放锁。
这时调度节点b也来获取任务1的锁(调度节点对任务1的群已经释放了),能获取到锁,所以又执行了任务1…
因此,任务短期内可能在多个调度节点上重复执行多次。
不知道我理解对吗?

@zhouyg
Copy link
Author

zhouyg commented Apr 11, 2021

这个项目不再维护了吗

@labulakalia
Copy link
Owner

@zhouyg 不会的 每次运行前会先检查任务的运行是否运行 如果在运行时不会再运行的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants