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

Start storing the processing host and process id for started invalidations #22981

Open
wants to merge 2 commits into
base: 5.x-dev
Choose a base branch
from

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Jan 24, 2025

Description:

fixes #22970

Review

@sgiehl sgiehl added this to the 5.3.0 milestone Jan 24, 2025
@sgiehl sgiehl force-pushed the dev-18888 branch 2 times, most recently from 64caadf to 7131058 Compare January 24, 2025 12:54
@michalkleiner
Copy link
Contributor

The storing part looks ok. Do we need to clean up the values at some point or they will remain in the table for the given invalidation?

Can it happen an invalidation will be picked up multiple times and we will rewrite the data with the latest processing info, possibly losing the previous one? And if so, is that a problem?

@sgiehl
Copy link
Member Author

sgiehl commented Jan 24, 2025

@michalkleiner would you mind to stop reviewing and changing unfinished PRs please? This has not yet been put into review

@michalkleiner
Copy link
Contributor

Apologies @sgiehl 🙇

$archiveFailureRecoveryTimeout = GeneralConfig::getConfigValue('archive_failure_recovery_timeout', $invalidation['idsite']);
if (
empty($invalidation['ts_started'])
|| $invalidation['ts_started'] > Date::now()->subSeconds($archiveFailureRecoveryTimeout)->getTimestamp()
Copy link
Member Author

@sgiehl sgiehl Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check never worked properly as ts_archived is provided from the database as datetime like 2025-01-01 12:00:00. Comparing that this way with a timestamp always results in true, causing the code below the check to never get executed.
As we are resetting stale invalidations in the begin of the archiving process, that shouldn't be required here anyway.

@sgiehl sgiehl requested a review from a team January 24, 2025 17:39
@sgiehl sgiehl added the Needs Review PRs that need a code review label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Store Hostname of Archiving Server in Invalidation Records
2 participants