-
Notifications
You must be signed in to change notification settings - Fork 66
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
创建check timer的方式为何要用lock来保证唯一性? #19
Comments
|
master 分支已经不再以 lock 的方式创建 timer. https://github.com/upyun/lua-resty-checkups/blob/master/lib/resty/checkups/api.lua#L184
|
@tokers @huangnauh 谢谢回复 2 对于死锁的问题,我考虑过,但持有timer的worker挂掉后会导致死锁。不过CHECKUP_TIMER_KEY这个值是和os.time相关的,所以挂掉后,CHECKUP_TIMER_KEY值会不同,不会有死锁的问题。 谢谢 |
|
@huangnauh 2 , 之前用lock方式的CHECKUP_TIMER_KEY是不变的是吧,好吧。。。 |
hello,请教下:
1 为何创建check timer要用lock的方式而不是用ngx.worker.id的方式来创建唯一timer?是有什么特殊的考虑吗?
2 在lock方式中(目前的方式),base.CHECKUP_TIMER_KEY在设置到mutex shdict中时为何要设置超时时间?(默认60s) ,
谢谢
The text was updated successfully, but these errors were encountered: