Generated with the help of an LLM.
Problem/Motivation
Like the queue statistics in #3635585: Store the queue statistics in key-value storage instead of state, the runtime measurements of purgers are stored in state. A purger that measures its runtime, such as the generic HTTP purger, changes its measurement after most successful processing runs. Each of those writes invalidates the cached state entry that every request loads.
Proposed resolution
Store the measurements in a key-value collection, and move the current values in a post-update function. Keep the deprecated $state property and constructor argument with the same backwards compatibility layer as #3635585: Store the queue statistics in key-value storage instead of state, and rename its state wrapper so that both trackers can use it.
The wrapper was already released in 3.8, but it's marked @internal and @deprecated, so people are not supposed to use it. This should not be considered a breaking change.
Remaining tasks
- Validate the proposed solution
Create a MR- Review
Issue fork purge-3637078
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
plachComment #4
plach