-
Notifications
You must be signed in to change notification settings - Fork 888
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
[Feature Anywhere] Cleanup of dangling augment-vis
saved objs
#4044
Comments
A problem with the above approach is if we don't clean up fast enough, this can lead to false limits being reached. For example, users try to add an association but reach some limit due to the existing saved obj count, when that count could possibly be including dangling/useless saved objs. |
Also when we do the create association call, that is where we should have the cleanup call to make sure that we have not reached the max associated objects to a viz limit |
What do you think of this?
I think both of these could be done in the respective saved obj loaders. But again it doesn't solve the problem of if these deletions are done via api directly where the logic would be skipped... |
a third scenario could be cron-job-style deletion by checking for any other dangling saved objs that could have been missed due to some failure, or if deleted via api like mentioned above, etc. |
I believe this approach is better than the cron job as its not adding extra load on the cluster. Having some dangling objects there until create/delete calls are made should be fine since these dangling objects would only affect the user if they are not cleaned up at creation time as it would indicate that the user reached the limit of associated plugin resources to the visualization. |
After some more thought, we can go ahead with the following approach:
Limitations:
|
Closed via #4059 |
There is two different scenarios where an
augment-vis
saved object can become stale:To determine when a visualization is deleted: when making a call to fetch the saved object, will return an error.
To determine when a plugin resource is deleted: when make a get call to the plugin resource, will return an error (separate than some permissions error).
Although these resources could be deleted in an event-driven way (e.g., deleting all saved objs when deleting the plugin resource, deleting all saved objs when deleting the visualization), this can lead to a few problems:Can lead to unexpected expensive calls when performing the deletions, if there is a lot of saved objs associated to some particular visualization and/or plugin resourceWould need to inject logic in many places where these deletions happen on the frontend (both in OSD + plugin UIs)Would miss deletions made via backend-only (direct api calls)Proposed solution is to have some async cron job running periodically in the background that handles deletion of dangling saved objs. It can iterate through all of them, makeget
calls to both the visualization and the associated plugin resource, and if either of them return errors such that the resource has been deleted, then we can delete the saved obj.The text was updated successfully, but these errors were encountered: