deleteLogDataForDeletedSites locks database for a long period, bogus query? #13800
Labels
Regression
Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone
The changes made in #13227 for deleteLogDataForDeletedSites seem to have caused a major performance issue. They result in a query that locks a large Piwik database for a long time, potentially several minutes. As far as I can see the queries will also never accomplish anything, since the where clause in the queries contains "site.idsite IS NULL" (created here:
matomo/plugins/PrivacyManager/Model/DataSubjects.php
Line 408 in 70505b1
It seems that whatever these queries should be doing is not happening. Instead they're causing tracking to be blocked for a significant time. The query plan for the above queries shows how bad it is since it goes through the whole log_visit table:
The text was updated successfully, but these errors were encountered: