Page MenuHomePhabricator

Fix fr_deleted drifts in WMF production
Closed, ResolvedPublicSecurity

Description

Following up T423821 we need to fix the drifts in wmf prod.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Zabe moved this task from Triage to In progress on the DBA board.

The following shows that in enwiki we have a drift in ~50k rows (~3.3% of all rows).

wikiadmin2023@10.64.0.142(enwiki)> select fr_deleted, count(*) from filerevision group by fr_deleted;
+------------+----------+
| fr_deleted | count(*) |
+------------+----------+
|          0 |  1051723 |
|          1 |   482978 |
|          2 |        3 |
|          4 |        1 |
|          9 |        7 |
|         10 |        4 |
|         11 |        1 |
+------------+----------+
7 rows in set (6.009 sec)

wikiadmin2023@10.64.0.142(enwiki)> select oi_deleted, count(*) from oldimage group by oi_deleted;
+------------+----------+
| oi_deleted | count(*) |
+------------+----------+
|          0 |    32587 |
|          1 |   534674 |
|          2 |        6 |
|          3 |        1 |
|          4 |        1 |
|          5 |        1 |
|          9 |        8 |
|         10 |        6 |
|         11 |        1 |
+------------+----------+
9 rows in set (1.627 sec)

wikiadmin2023@10.64.0.142(enwiki)> select count(*) from image;
+----------+
| count(*) |
+----------+
|   967122 |
+----------+
1 row in set (1.225 sec)

wikiadmin2023@10.64.0.142(enwiki)>

Change #1278605 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/WikimediaMaintenance@master] Add script to fix fr_deleted drifts

https://gerrit.wikimedia.org/r/1278605

Change #1278605 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMaintenance@master] Add script to fix fr_deleted drifts

https://gerrit.wikimedia.org/r/1278605

Change #1280417 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/WikimediaMaintenance@wmf/1.46.0-wmf.26] Add script to fix fr_deleted drifts

https://gerrit.wikimedia.org/r/1280417

Change #1280417 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMaintenance@wmf/1.46.0-wmf.26] Add script to fix fr_deleted drifts

https://gerrit.wikimedia.org/r/1280417

Zabe renamed this task from Check for fr_deleted drifts to Fix fr_deleted drifts in WMF production.May 1 2026, 2:01 PM

I fixed the drifts on all wikis except commons. If no new drifts occur (which I really hope), I will fix them on commons as well.

So drifts are reappearing, currently enwiki is back to 18 drifts.

Change #1281821 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@master] Correctly support new file tables in RevisionDeleteUser

https://gerrit.wikimedia.org/r/1281821

Change #1281821 merged by jenkins-bot:

[mediawiki/core@master] Correctly support new file tables in RevisionDeleteUser

https://gerrit.wikimedia.org/r/1281821

Change #1281894 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@wmf/1.46.0-wmf.26] Correctly support new file tables in RevisionDeleteUser

https://gerrit.wikimedia.org/r/1281894

Jdforrester-WMF subscribed.

Does this need backporting to REL1_46 (once fixed generally).

Does this need backporting to REL1_46 (once fixed generally).

Yes. I would also backport these to REL1_45 and REL1_44 since those branches support setting the file schema migration to write both.

Change #1281933 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@REL1_46] Correctly support new file tables in RevisionDeleteUser

https://gerrit.wikimedia.org/r/1281933

Change #1281936 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@REL1_45] Correctly support new file tables in RevisionDeleteUser

https://gerrit.wikimedia.org/r/1281936

Change #1281933 merged by jenkins-bot:

[mediawiki/core@REL1_46] Correctly support new file tables in RevisionDeleteUser

https://gerrit.wikimedia.org/r/1281933

Change #1281944 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@REL1_44] Correctly support new file tables in RevisionDeleteUser

https://gerrit.wikimedia.org/r/1281944

Change #1281944 merged by jenkins-bot:

[mediawiki/core@REL1_44] Correctly support new file tables in RevisionDeleteUser

https://gerrit.wikimedia.org/r/1281944

Change #1281936 merged by jenkins-bot:

[mediawiki/core@REL1_45] Correctly support new file tables in RevisionDeleteUser

https://gerrit.wikimedia.org/r/1281936

Change #1281894 merged by jenkins-bot:

[mediawiki/core@wmf/1.46.0-wmf.26] Correctly support new file tables in RevisionDeleteUser

https://gerrit.wikimedia.org/r/1281894

Zabe added a subscriber: sbassett.

@sbassett this can be made public.

sbassett triaged this task as Medium priority.May 11 2026, 1:53 PM
sbassett changed Author Affiliation from N/A to Wikimedia Communities.
sbassett changed the visibility from "Custom Policy" to "Public (No Login Required)".
sbassett changed the edit policy from "Custom Policy" to "All Users".
sbassett changed Risk Rating from N/A to Medium.