Page MenuHomePhabricator

MediaWiki allows saving an identical revision on top of another (due to content model?)
Open, MediumPublic

Description

URL:

MariaDB [intense]> select rev_id, rev_timestamp, rev_len, rev_parent_id, rev_sha1, rev_content_model, rev_content_format from revision where rev_page = 17584;
+--------+----------------+---------+---------------+---------------------------------+-------------------+--------------------+
| rev_id | rev_timestamp  | rev_len | rev_parent_id | rev_sha1                        | rev_content_model | rev_content_format |
+--------+----------------+---------+---------------+---------------------------------+-------------------+--------------------+
|  17604 | 20150104125532 |     107 |             0 | dmflmumti82h6wejvf4hqpuowydw26y | NULL              | NULL               |
|  36886 | 20150118211111 |     107 |         17604 | dmflmumti82h6wejvf4hqpuowydw26y | wikitext          | text/x-wiki        |
+--------+----------------+---------+---------------+---------------------------------+-------------------+--------------------+
2 rows in set (0.00 sec)

Expected: only one revision in history.

MediaWiki 1.25alpha, ada66e75f35ac7391e5e2fb0534a0996fef5166c

Event Timeline

Nemo_bis raised the priority of this task from to Needs Triage.
Nemo_bis updated the task description. (Show Details)
Nemo_bis added subscribers: Nemo_bis, Nikerabbit.
Aklapper triaged this task as Medium priority.Jan 20 2015, 10:18 PM

It would be nice to solve this before we have millions of revisions to cleanup in the databases, btw.

  • Does this happen on production wikis? Could be caused by incomplete/botched database schema update.
  • Does this happen for humans rather than extension-bots? There's no underlying assumption that two subsequent revisions of one page may not have the same content, that's just how EditPage/WikiPage works.
  • Does this happen on production wikis?

Didn't test.

Could be caused by incomplete/botched database schema update.

https://paste.debian.net/141552/
I still see NULL for revision 17604

  • Does this happen for humans rather than extension-bots?

Didn't test either. Can humans create a page with NULL content model?

There's no underlying assumption that two subsequent revisions of one page may not have the same content, that's just how EditPage/WikiPage works.

If something happened to be left without this feature, I'd call that a bug. Cf. T35461.

@Merl said on #wikimedia-tech:

my bot is doing some nulledits because of from langlink table entries from wikidata. could sb. exmplain why some edits are visible in version history, although there is no difference? e.g. https://nv.wikipedia.org/w/index.php?diff=153837&oldid=140009

But the case seems different:

MariaDB [nvwiki_p]> select rev_id, rev_timestamp, rev_len, rev_parent_id, rev_sha1, rev_content_model, rev_content_format from revision where rev_page = 14436;
+--------+----------------+---------+---------------+---------------------------------+-------------------+--------------------+
| rev_id | rev_timestamp  | rev_len | rev_parent_id | rev_sha1                        | rev_content_model | rev_content_format |
+--------+----------------+---------+---------------+---------------------------------+-------------------+--------------------+
| 140009 | 20121102213343 |      55 |             0 | nyq4r5ixry67p5240ljraiwzplfp3vk | NULL              | NULL               |
| 153837 | 20150209090826 |      54 |        140009 | f2js8soeo4n4t5x4h8tblx7ui1mofa6 | NULL              | NULL               |
+--------+----------------+---------+---------------+---------------------------------+-------------------+--------------------+
2 rows in set (0.00 sec)

This behaviour seems reasonable to me. We also create dummy revisions for other events, such as file upload, so content model edits make sense (Even if its slightly less dummy in this case, since rev_content_model is changing).

I'm leaning towards decline on this bug.