Automatic Cleanup of Duplicate Invalidation Records Upon Reset #22972
Labels
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Stability
For issues that make Matomo more stable and reliable to run for sys admins.
Background
In Matomo's current archiving process, when an invalidation request is created, the system checks whether an identical invalidation already exists. If an identical entry is found, a new invalidation is not created, as the existing one will be processed anyway.
However, if an invalidation is already in progress and a new identical request is made, the system assumes that the currently processed invalidation might result in outdated data and therefore stores the new request.
A potential issue arises when an in-progress invalidation is interrupted (e.g., due to a crash) but remains marked as "started." While the system is designed to automatically reset such invalidations after 24 hours, it does not currently check for newer identical requests. This can result in duplicate invalidations in the database, leading to unnecessary resource consumption during data aggregation.
Proposed Solution
To optimize resource usage and avoid redundant processing, we propose implementing an automatic cleanup mechanism that performs the following actions when resetting an invalidation after 24 hours:
Check for newer identical invalidation records:
Benefits
Implementation Considerations
This request provides a structured and clear outline of the problem, solution, and benefits while ensuring a professional tone suitable for GitHub.
The text was updated successfully, but these errors were encountered: