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
Removing a scheduler interval when a interval action still using it would crash the scheduler #2520
Comments
@novuscy I am unable to recreate this issue. Can you please share more-detailed steps that you carried out when you saw this issue? Thanks. |
If you delete the midnight interval by NAME, edgex actually prevents you doing that with an error of "interval still in use by intervalAction(s) name: midnight", but nothing stops you delete the interval by ID. |
same thing happened when I used edgex-cli db purge to clean the database. |
And if I update a interval action with a new interval, the old interval seemed somehow still linked to the action, when I try to delete the old interval, an error says that the old one is still in use, and the old interval could not be deleted neither by ID nor by NAME. |
@novuscy Your response to my query is much appreciated 👍 This helps - I'll investigate, and will follow up, thanks. |
@novuscy I followed the steps, for example:
|
And:
|
Thanks for your investigation into this, but I was using REST API to delete the interval ,not the redis cli. |
@novuscy I will follow up, thanks. |
|
The root cause has two parts:
|
While working on a fix, and thanks to input from @AnthonyMBonafide, a possible race condition has been discovered surrounding the area related to this issue. That should separately be investigated at some point in time. |
|
interacting with the support-scheduler service.
|
🐞 Bug Report
Affected Services
support-scheduler
Description and Minimal Reproduction
If I remove an interval when an interval action still using it, but leave the action untouched, the scheduler won't start any more next time. I had to manually delete keys associated with the action in the redis database to make the scheduler work again.
Is there a mechanism preventing an interval being removed when it's still used by some actions? something like that you can't remove a profile when it's used by some devices.
🔥 Exception or Error
🌍 Your Environment
Deployment Environment:
go 1.14
EdgeX Version:
master
Anything else relevant?
The text was updated successfully, but these errors were encountered: