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
Add scheduled task to delete log data for sites that have been deleted. #13227
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feedback
- Could we make the SQL query work with a JOIN so it works well with 10,000 IDs?
- I propose to remove the event
PrivacyManager.deleteDataSubjectsForDeletedSites
because instead the easier to understand eventSitesManager.deleteSite.end
can be used
Then please merge @diosmosis
// an ongoing delete, the new valid data won't be deleted. | ||
$maxIdSite = max($idSites); | ||
|
||
$where = "$tableToSelect.idsite NOT IN (" . implode(',', $idSites) . ") AND $tableToSelect.idsite <= ?"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would probably be better here to JOIN to the site table so it works fast when there are 10,000 websites? as I think the NOT IN (10000 ids here) will not work well IIRC
What if the plugin has to delete from a custom log table where there is lots of data? Doing that in |
@mattab Updated. |
…d. (matomo-org#13227) * Add scheduled task to delete log data for sites that have been deleted. * Update Changelog for new event. * Use JOIN instead of NOT IN & remove event.
Changes:
PrivacyManager.deleteDataSubjectsForDeletedSites
event.Fixes #12907