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
Make log_action deletion require no table locking #13872
Comments
Which issue is this a duplicate of? |
@EreMaijala unfortunately I can't find the issue right now. @diosmosis do you maybe remember? |
@tsteur No, it was mentioned in slack but we don't have a paid account so we can't look that far back. |
@diosmosis, @tsteur Well, may I suggest reopening this one until the actual duplicate issue is found? |
Sure 👍 |
Regularly people report issues with this locking mechanism. It would make Matomo that bit more stable if log_action deletion required no table locking. The workaround currently is to run the process less often for example once a year with |
Currently when purging dangling references from the log_action table, we lock it in order to make sure we don't accidentally delete a row that ends up being referenced during tracking. This is problematic, since purging log_action can take a long time, and blocks tracking while it is running.
The proposed solution is to remove the need for locking by:
ACTION_DELETED
. the tracker cannot use an action whose type isACTION_DELETED
ACTION_DELETED
. then running queries to delete all ACTION_DELETED actions.Issues w/ concurrency must be reviewed carefully when implementing. Eg, we must ensure situations like the following do not occur:
or:
The text was updated successfully, but these errors were encountered: