Page MenuHomePhabricator

mediawiki_content_current exports silently omit all pages edited between the snapshot cutoff and dump generation time
Closed, ResolvedPublicBUG REPORT

Description

Title

mediawiki_content_current exports silently omit all pages edited between the snapshot cutoff and dump generation time (enwiki 2026-07-01: ~3,560 pages missing per partition file)

Tags: Dumps-generation


Summary

The mediawiki_content_current XML export for enwiki dated 2026-07-01 (generated 2026-07-05, ~03:47–04:47 UTC per file timestamps) is missing every page that was edited on or after the snapshot cutoff (2026-07-01T00:00:00Z) but before generation time — even {F92830481}though each of these pages has a valid pre-cutoff revision that a point-in-time snapshot should contain.

The result is a dump that never leaks post-cutoff content (internally consistent), but silently omits tens of thousands of pages — biased toward exactly the pages consumers most expect a "current" export to include: current events, new releases, actively maintained articles, and bot-updated pages.

Steps to reproduce

  1. Download and decompress from https://dumps.wikimedia.org/other/mediawiki_content_current/enwiki/2026-07-01/xml/bzip2/ the file enwiki-2026-07-01-p73796143p78432142.xml.bz2 (page-id range p73796358–p78432142).
  2. Search for page id 77315100 ([[The Devil Wears Prada 2]]): ` grep '<id>77315100</id>' enwiki-2026-07-01-p73796358p78432142.xml ` → no match. The page's title is also absent from the file. Adjacent page ids (77315097, 77315098, 77315101, 77315102, 77315103, 77315105) are present, so the file is not truncated at that point.
  3. Compare with the classic dump of the same date: ` grep '<id>77315100</id>' enwiki-20260701-pages-articles27.xml-p75975910p77475909 ` → present.
  4. The page is also present in the previous month's mediawiki_content_current export (enwiki-2026-06-01-p75985506p80463446.xml), and existed on-wiki throughout, with an ordinary edit history and no moves/deletes/merges in the relevant window.

Scale

Diffing the page-id sets of the new-style file p73796358p78432142 against the
overlapping classic pages-articles file for the same date yields 3,560 page
ids present in the classic dump but absent from the new export
(list
attached: dropped.ids). The missing pages span all namespaces (main, Draft,
Template, Wikipedia, File, Category) and all topics. Extrapolated across the
full id space, this is plausibly on the order of tens of thousands of pages
wiki-wide, though edit activity is not uniform across id ranges.

Root-cause evidence

Every missing page checked so far was edited between 2026-07-01T00:00:00Z and
the 2026-07-05 generation run
:

  • The Devil Wears Prada 2 (pageid 77315100): edited 2026-07-01 14:06, 20:23, 20:25 UTC and daily thereafter. Last pre-cutoff revision: 2026-06-30 20:08 UTC — a valid snapshot state existed and was not emitted.
  • Supergirl (2026) (pageid 63890530): high-frequency post-release updates; absent from p60523479p65058432 while adjacent ids are present.
  • Llanthomas Castle Mound: a low-traffic article (~4 pageviews/day) with no edits between 15 June and 30 June, then an editing burst starting 2026-07-01 06:44 UTC. Its 15 June revision should have been in the snapshot; the page is absent. This rules out any traffic/popularity-based explanation — the only common factor is a post-cutoff edit.
  • Bot-maintained pages that are rewritten daily (e.g. WP 1.0 Editorial Team "articles by quality log" pages) appear in the missing set, as predicted if the criterion is "edited after cutoff".

The maximum revision timestamp anywhere in the affected file is
2026-06-30T23:59:52Z, confirming a hard midnight-UTC cutoff and that no
post-cutoff revisions leak into the dump.

Hypothesized mechanism

The export appears to be generated by filtering rev_timestamp < cutoff
against a table that holds only the latest revision per page. For a page
edited after the cutoff, the pre-cutoff row has already been overwritten, so
the filter matches nothing and the page is dropped from the output entirely —
instead of being rolled back to (or retained at) its as-of-cutoff revision.

If that is correct, every monthly export of this dataset omits every page
edited between the snapshot date and the generation run (a ~4-day window for
this dump), and validation focused on "no post-cutoff content" would not
detect it.

Expected behavior

Either (a) each page appears at its latest revision with
rev_timestamp < 2026-07-01T00:00:00Z, or (b) if a true point-in-time
snapshot is not feasible from a latest-only table, pages edited after the
cutoff should be included at their current revision rather than silently
omitted — and the dataset documentation should state the chosen semantics.

Actual behavior

Pages edited between 2026-07-01T00:00:00Z and generation time are entirely
absent from the export, with no error, marker, or documentation of the
omission.

Attachments

  • dropped.ids — 3,560 page ids present in enwiki-20260701-pages-articles but absent from enwiki-2026-07-01-p73796358p78432142.xml (overlapping id range only).

Environment / notes

  • Dataset: other/mediawiki_content_current/enwiki/2026-07-01/xml/bzip2/
  • _SUCCESS marker dated 05-Jul-2026 04:47; per-file mtimes 03:47–04:47 UTC.
  • Same-date classic dump (enwiki/20260701/, pages-articles / pages-meta-current) is not affected and was used as the reference.
  • Happy to provide additional samples, the comparison scripts, or run further checks on request.

Details

Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
mw_content_xml_export: Fix current export dropping edited pagesrepos/data-engineering/airflow-dags!2586xcollazofix-mw-current-file-exportmain
Customize query in GitLab

Event Timeline

Aklapper changed the task status from Open to Stalled.Jul 10 2026, 7:12 PM
Aklapper edited projects, added: Dumps-Generation; removed: MediaWiki-ContentHandler.

Happy to provide additional samples, the comparison scripts, or run further checks on request.

This seems to be potential LLM slop. Please confirm that this is actual a valid ticket, and follow https://www.mediawiki.org/wiki/How_to_report_a_bug instead. Thanks.

The new wikipedia dump format drops the pages if they are edited between the first of the month and the time the dump happens.
The old dumps work.
I tried to give enough information to make this reproducible.
I noticed movies like Supergirl (2026) and The Devil Wears Prada 2 were missing from the dump.

I can use the old dumps, but this is a pretty bad bug (as all the popular/editted pages) get dropped.

Tom

I hit this independently on jawiki (2026-07-01 export) before finding this task,
so I can confirm the issue is real and not enwiki-specific.

I extracted all ns=0 pages from the two published jawiki files (p1p2517953 and
p2517954p5262960; both well-formed, _SUCCESS present, file dates 06-Jul, i.e. a
~5 day cutoff-to-generation window) and checked every wikilink target that could
not be resolved within the dump against the Action API.

Result: 18,287 currently existing pages with page ids inside the covered ranges
are absent from the export (about 1.2% of jawiki articles). Only 9 unresolved
titles were created after the snapshot and 1 was deleted since.

Example: 日本 (Japan, pageid 4821051) is absent, while ids 4821050 and 4821052
are both present in p2517954p5262960, so this is not file truncation.

The missing set is heavily skewed toward frequently edited pages (日本,
アメリカ合衆国, most prefectures, major countries), which is what the
"edited between cutoff and generation" mechanism predicts, since pages edited
daily always fall in that window. simplewiki 2026-07-01 checked the same way
had no missing prominent pages.

I can attach the full title/pageid list (TSV) if useful.

Ottomata added subscribers: Ahoelzl, Ottomata.

Hi! Thank you for the report. I see you also filed T432178 which looks like a duplicate of this. I closed that one as a dup. Please reopen if that was incorrect.

@Ahoelzl Let's find someone to take a look soon.

I confirm this bug (I just detected it on the French wiktionary dump).

As stated this affects ALL namespaces and is a MAJOR problem.

For instance, the 2026-07-01 dump of French wiktionary lacks the Module:lexique page because it has been modified July 3rd. This module is used by almost ALL French wiktionary pages. With this bug, any use of the dumps will be impossible because of missing templates/Modules. The probability of an edit on such pages in a 5-6 days window is quite high.

Expected behaviour:

  1. Do not use cutoff date (export page as it is at the time of the effective export). Drawback: the versions of the pages may be incoherent (especially Templates/Modules)
  2. Do extract the cutoff version of pages even if edited in the mean time (i.e. do not take the latest version at the time of dump, but the latest version dated before the cutoff)
xcollazo renamed this task from mediawiki_content_current exports silently omit all pages edited between the snapshot cutoff and dump generation time (enwiki 2026-07-01: ~3,560 pages missing per partition file) to mediawiki_content_current exports silently omit all pages edited between the snapshot cutoff and dump generation time.Aug 26 2026, 7:00 PM

Hey all, just acknowledging here that we can reproduce this issue, and that indeed it affects all MediaWiki Content Current File Exports.

We are working on a fix.

xcollazo changed the task status from Stalled to In Progress.Aug 28 2026, 4:24 PM
xcollazo triaged this task as High priority.

Change #1332814 had a related patch set uploaded (by Xcollazo; author: Xcollazo):

[analytics/refinery@master] File Export: HQL for point-in-time snapshot of mediawiki content

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

Change #1332814 merged by Xcollazo:

[analytics/refinery@master] File Export: HQL for point-in-time snapshot of mediawiki content

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

Exports had just started since it is Sept 1. We are pausing mediawiki_content_current exports generation as we are testing a fix for this issue. Some exports did finish already so we will likely delete them and rerun.

Did the following in prod:

  1. Paused both mediawiki_content_history and mediawiki_content_current.
  2. Deployed https://gitlab.wikimedia.org/repos/data-engineering/airflow-dags/-/merge_requests/2586
  3. Deleted old Airflow Variable main/dags/mediawiki/content/export/mw_content_xml_export_dags.py so that it would re-generate with new values.
  4. Reviewed everything looks good in Airflow. Unpaused mediawiki_content_history to continue as is. Cleared run for mediawiki_content_current, to start all dumps again for Sept 1 run.

Will continue observing.

Some details about the issue:
The mediawiki_content_current export was based on an internal table wmf_content.mediawiki_content_current_v1. That table stores exactly one row per page: its most recent revision. The export then filtered it with revision_dt < cutoff.

For any page edited between the snapshot cutoff and the XML generation run, the only stored row is the post-cutoff revision. The filter matched nothing, and the page was omitted from the output entirely, rather than falling back to its latest pre-cutoff revision.

@Tom_costello_ireland's hypothesised mechanism in the task description was right. Thank you for the precise report. Thanks also to @Miyajastu for the independent jawiki measurement and to @Dodecaplex for the frwiktionary Module:lexique case — we used both as test cases for the fix.

The fix:
The export no longer reads mediawiki_content_current_v1. It now builds a point-in-time table from wmf_content.mediawiki_content_history_v1, which is an internal table that retains every revision, and for each page selects the most recent revision dated before the cutoff. That is the second of the two behaviours @Dodecaplex described: pages are exported at their as-of-cutoff revision, not skipped and not advanced to a post-cutoff revision.

Verification against all wikis at cutoff 2026-07-01:

  • The corrected snapshot holds 695,457,341 pages. The old code path would have published 652,541,720.
  • frwiktionary Module:lexique is present, at its pre-cutoff revision from 2025-12-28.

The first corrected export will be the 2026-09-01 run.

Hi @xcollazo

Thanks for the fix, I confirm that the number of elements I extract each months from the dump is now raising at its normal rate in all wiktionary dumps I use (27 languages).

This was drastically better for English and French that have a very high number of edits.

Thanks again,

Hi, @xcollazo

I can confirm that this has fixed the "articles edited after snapshot are missing from dump" issue, but it seems there's a regression of the "moved articles don't have any page text" issue previous reported/fixed in T417596.

wget https://dumps.wikimedia.org/other/mediawiki_content_current/enwiktionary/2026-09-01/xml/bzip2/enwiktionary-2026-09-01-p6p12034212.xml.bz2
bzcat enwiktionary-2026-09-01-p6p12034212.xml.bz2 | grep '^      <text bytes="[^"]*" sha1="[^"]*" xml:space="preserve"></text>' | wc -l
1244

Sample of an empty page misclassified as a redirect in the ContentFileExport

bzcat enwiktionary-2026-09-01-p6p12034212.xml.bz2 | grep -B1 -A20 '<title>Template:en-intj</title>'
  <page>
    <title>Template:en-intj</title>
    <ns>10</ns>
    <id>463225</id>
    <revision>
      <id>87661056</id>
      <parentid>53167838</parentid>
      <timestamp>2025-10-31T07:10:17Z</timestamp>
      <contributor>
        <username>Benwing</username>
        <id>172432</id>
      </contributor>
      <minor />
      <comment>Benwing moved page [[Template:en-interj]] to [[Template:en-intj]]: Standardize name: standardize on shorter, easier to type name</comment>
      <origin>53167838</origin>
      <model>wikitext</model>
      <format>text/x-wiki</format>
      <text bytes="91" sha1="o74nl7xq9tkj2pu0e44uyb9gnnklk74" xml:space="preserve"></text>
      <sha1>o74nl7xq9tkj2pu0e44uyb9gnnklk74</sha1>
    </revision>
  </page>

Hi, @xcollazo

I can confirm that this has fixed the "articles edited after snapshot are missing from dump" issue, but it seems there's a regression of the "moved articles don't have any page text" issue previous reported/fixed in T417596.

@JeffDoozan thanks for the report. I will close this particular ticket and reopen T417596 for investigating your finding.