You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am looking a HA solution for celery beat and found this project, Thanks for you project, It is useful to me.
But When I learn the code, I found one possible problem about how to refreshing/extending the lock.
There could check lock before extended lock, so should use a lua script do check lock and extend lock, this ensures atomicity.
Finally, we also need to check the result of the refresh/extend lock, it is possible that the refresh/extend failed, meaning missing lock or network error.
Hello, I am looking a HA solution for celery beat and found this project, Thanks for you project, It is useful to me.
But When I learn the code, I found one possible problem about how to refreshing/extending the lock.
There could check lock before extended lock, so should use a lua script do check lock and extend lock, this ensures atomicity.
Finally, we also need to check the result of the refresh/extend lock, it is possible that the refresh/extend failed, meaning missing lock or network error.
Like this: (from redbeat)
https://github.com/sibson/redbeat/blob/5d1d5c154d2e080d3135afee235321abf5d2da5b/redbeat/schedulers.py#L37
or Like this: (from golang redlock lib)
https://github.com/go-redsync/redsync/blob/311e82d385dcf0b228cb1b4974b690f8bb2dc127/mutex.go#L254
The text was updated successfully, but these errors were encountered: