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

Clear a request's events when deleting the request #422

Open
max-moser opened this issue Jan 27, 2025 · 0 comments
Open

Clear a request's events when deleting the request #422

max-moser opened this issue Jan 27, 2025 · 0 comments

Comments

@max-moser
Copy link
Contributor

Problem statement

Deleting a request leaves orphan events

Right now, deleting a request does not touch the events (e.g. comments and action-log events) that are associated with the request.
This means that deleting a request will leave a bunch of "orphan" events in the system.
They are still available in the database, and also in the search engine.

Orphans are awkward to handle

Those are especially awkward to look up, since the event service methods usually try to resolve the associated request (which won't work because it's deleted) before trying to look up the events themselves.

Possible solution: Add a service component with a delete hook

Currently, the request service doesn't take events into consideration for delete(), and none of the service components have a hook for delete.
Perhaps we could add a service component that implements such a hook and deletes all associated events.

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

1 participant