mediawiki-extensions-Growth.../maintenance
Martin Urbanec e192edb942 fixLinkRecommendationData: Add --force when a production run is needed
Why:
fixLinkRecommendationData currently refuses to run
in production when --db-table is passed as an argument.
This is because the search index is delayed, and it
takes hours (if not days) to recognize update commands
coming from GrowthExperiments.

Unfortunately, when recovering from broken search index
scenario (T362367), the only solution for dangling DB
records is to drop them all, and deal with possible
incorrect removals later (by re-running the script
with --search-index).

What:
Add --force, which bypasses the "unsafe for production"
check. I documented it as "use with care", as during normal
operation, there is no reason to ever need to force it,
and understanding why the check is there is critical
to avoid breakages.

Patch also updates docstrings, as batching is in fact
implemented, and replication lag is checked in
commitTransaction(). The script indeed does not
handle search index update lag, so it has some risky
aspects, but assuming one is aware of the risks
(mainly increasing dangling search records, which
are more visible and problematic), it is executable
in production.

Bug: T364341
Change-Id: Ic8c563ce8fc36e67eeeb8a892e8f327f62a7b146
2024-05-12 22:24:51 +02:00
..
ExportWelcomeSurveyMailingListData.php Migrate to IReadableDatabase::newSelectQueryBuilder 2024-04-28 10:23:32 +02:00
UnInvalidateImageSuggestion.php Add maintenance script for testing image suggestions 2023-06-09 19:33:35 +00:00
changeWikiConfig.php Use namespaced classes 2024-01-06 17:57:40 +01:00
deleteExpiredUserImpactData.php Migrate to IReadableDatabase::newSelectQueryBuilder 2024-04-28 10:23:32 +02:00
deleteOldSurveys.php Migrate to IReadableDatabase::newSelectQueryBuilder 2024-04-28 10:23:32 +02:00
fixLinkRecommendationData.php fixLinkRecommendationData: Add --force when a production run is needed 2024-05-12 22:24:51 +02:00
fixSuggestedEditChangeTags.php Use namespaced classes 2024-01-06 17:57:40 +01:00
getImageSuggestionData.php Use namespaced classes 2024-01-06 17:57:40 +01:00
getPraiseworthyMentees.php Add getPraiseworthyMentees.php maintenance script 2023-02-22 22:55:22 +01:00
importOresTopics.php Use namespaced classes 2024-01-06 17:57:40 +01:00
initWikiConfig.php Use namespaced MediaWiki\Page\PageProps 2023-08-20 01:22:00 +02:00
insertLinkRecommendation.php maintenance: Use standard Maintenance.php boilerplate 2022-09-30 20:08:51 +01:00
listTaskCounts.php listTaskCounts: Do not expect tasks key to be present 2023-09-22 14:05:03 +02:00
migrateServerConfig.php Update moved class TitleFactory 2023-04-19 16:55:40 +00:00
purgeExpiredMentorStatus.php Migrate to IDatabase::newDeleteQueryBuilder 2024-04-12 22:30:39 +02:00
reassignMentees.php Migrate to IReadableDatabase::newSelectQueryBuilder 2024-04-28 10:23:32 +02:00
refreshLinkRecommendations.php Use namespaced classes 2024-01-06 17:57:40 +01:00
refreshPraiseworthyMentees.php Build backend for PersonalizedPraise 2023-02-18 00:58:46 +01:00
refreshUserImpactData.php Migrate to IReadableDatabase::newSelectQueryBuilder 2024-04-28 10:23:32 +02:00
revalidateLinkRecommendations.php Use namespaced classes 2024-01-06 17:57:40 +01:00
updateIsActiveFlagForMentees.php Remove GEMentorshipUseIsActiveFlag 2022-12-02 14:27:30 +00:00
updateMenteeData.php Migrate to IDatabase::newDeleteQueryBuilder 2024-04-12 22:30:39 +02:00
updateMetrics.php Calculate mentorship-related metrics 2022-11-03 22:12:18 +01:00