Store Hostname of Archiving Server in Invalidation Records #22970
Labels
Easier debugging
For issues that make troubleshooting issues for developers easier.
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Background
Matomo's archiving process relies on invalidation records to determine which data needs to be (re-)processed. Whenever an invalidation occurs, a corresponding record is created, and the archiving process identifies the next available invalidation for processing. During this process, the status of the invalidation is updated, and a timestamp is set to indicate when processing began.
Problem Statement
In a multi-tenant environment with multiple archiving servers, it would be beneficial to track which server is processing a specific invalidation. Currently, there is no built-in mechanism to determine which server is handling a given invalidation, which can make troubleshooting and monitoring more challenging.
Proposed Solution
To address this, we propose extending the invalidation table to include a field for storing the hostname of the archiving server as well as the current process id when an invalidation is marked as "started." This enhancement would provide several benefits, including:
Improved Monitoring and Debugging:
Easier Failure Recovery:
Use Case Example
If a server crashes, invalidations assigned to it would remain in the "started" state indefinitely. With the hostname stored in the invalidation record, administrators can easily identify affected entries and take appropriate action to reset or reprocess them.
Implementation Considerations
processing_host
,process_id
) in the invalidation table.The text was updated successfully, but these errors were encountered: