Skip to content
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

Console Command to Manually Reset Stuck Invalidation Records #22971

Open
sgiehl opened this issue Jan 23, 2025 · 0 comments
Open

Console Command to Manually Reset Stuck Invalidation Records #22971

sgiehl opened this issue Jan 23, 2025 · 0 comments
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.

Comments

@sgiehl
Copy link
Member

sgiehl commented Jan 23, 2025

Background

In the current Matomo archiving process, invalidations that need to be processed are marked as "started" when processing begins. However, if the process is interrupted due to events such as server crashes or restarts, these invalidations may remain in the "started" state indefinitely.

Although the system is designed to automatically restart such invalidations if they have been in the "started" state for more than 24 hours, this delay can result in outdated aggregated data, potentially causing inconvenience to users and administrators.

Proposed Solution

To provide administrators with a more immediate and flexible way to handle stuck invalidations, we propose implementing a new console command that allows manual resetting of invalidation records without directly modifying the database.

Command Capabilities

The proposed command should offer the following features:

  • Reset stuck invalidations

    • Unset the "started" status of invalidations to allow reprocessing.
  • Filtering options to target specific invalidations, including:

    • --processing-host: Specify the hostname of the archiving server.
    • --idSite: Limit the reset operation to a specific site.
    • --date-range: Define a range of start times to narrow down affected invalidations.

Use Case Example

Consider a scenario where an archiving server crashes, leaving several invalidations in a "started" state. Instead of waiting for the automatic 24-hour reset, an administrator could manually run the proposed console command to clear invalidation states for the affected host, ensuring timely data aggregation and reporting.

Implementation Considerations

  • The command should include safeguards such as confirmation prompts or dry-run modes to prevent accidental modifications.

refs / requires #22970

@sgiehl sgiehl added 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. labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

1 participant