In T350681: Update purgeOldData.php maintenance script to look for and delete orphaned map rows code was added to purge orphaned client hints data which is then called by the purgeOldData.php maintenance script.
When using the purgeOldData.php maintenance script a call to UserAgentClientHintsManager::deleteOrphanedMapRows is made inside the prune method of the maintenance script. This method is called for all three CheckUser result tables (cu_changes, cu_log_event, and cu_private_event) as well as recentchanges.
However:
- The call to UserAgentClientHintsManager::deleteOrphanedMapRows is made when purging recentchanges entries, which is incorrect
- UserAgentClientHintsManager::deleteOrphanedMapRows purges data from all three of the CheckUser result tables instead of purging from a specific table.
Instead, the UserAgentClientHintsManager::deleteOrphanedMapRows call should be made outside the prune method and the result printed to the console separately. Otherwise the purged counts will be off.