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
Old data in log tables without idvisit column are not purged (affects plugins) #16529
Comments
To reproduce this issue have Form Analytics installed and track data. Then configure log data deletion as defined in https://matomo.org/faq/troubleshooting/faq_42/ . At least in the beginning you will want to configure a high minimum amount of days like When the task runs to delete old log data, which you can do eg using You will then notice in It's only deleting data from tables that have an on the contrary in https://github.com/matomo-org/matomo/blob/4.4.1/plugins/PrivacyManager/Model/DataSubjects.php#L72-L77 where we have the logic for deleting individual visit data it does delete data from these tables. Not sure if any of the logic can be reused as at least the We need to make sure that we delete the correct data from all the needed tables when log purging runs. At the same time we need to make sure these tables won't be locked for too long as otherwise there will be server issues while trying to track data into these tables. |
Does that mean to reproduce I will need to create data going back more than I currently have no form data logs and would create a form, submit it and see what it logs. Then I would try to repeat the request with some different parameters to figure out how it all works. I debugged the script like so:
but it didn't hit Might this be part of the problem or does it hit Answering partly my own question: Lines 98 to 101 in 0e34030
seems to call this method only if there are logs. The question that remains though what is the most effective and fastest way to generate the logs to be deleted? |
I think the Visitor Generator which purpose is to generate test logs? it's pretty slow but it should work fine.. |
Thanks @mattab . For future reference, I use this command:
|
@geekdenz you could also set a different number of days like 300 or so. You just want to probably not delete any recent data by accident. |
According to customers in https://forum.matomo.org/t/form-analytics-doesnt-cleanup-its-old-form-field-form-page-log-data/38567
We would expect that log_form_page and log_form_field are purged indeed.
from @tsteur this is supposed to be done by core but it looks like it’s not fully implemented there for log tables without idvisit column.
The text was updated successfully, but these errors were encountered: