Last modified: 2012-03-05 00:58:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T36922, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34922 - Mistake in old user contributions diff size
Mistake in old user contributions diff size
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
History/Diffs (Other open bugs)
unspecified
All All
: Unprioritized minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-03 06:43 UTC by Daniel Money
Modified: 2012-03-05 00:58 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Money 2012-03-03 06:43:35 UTC
There appears to be a bug in reporting the size of diffs in old user contributions.  Both http://en.wikipedia.org/w/index.php?title=Special:Contributions/Dpmuk&dir=prev&target=Dpmuk and http://en.wikipedia.org/w/index.php?title=Special:Contributions/Goodvac&dir=prev&target=Goodvac show this (pretty much any large change is an error, which should be obvious by clicking on the diff).  It would appear that showing a single diff in the page history has a similar problem, e.g. http://en.wikipedia.org/w/index.php?title=House_of_Burgesses&dir=prev&offset=20071119010057&limit=1&action=history but along with other versions it's fine, e.g. http://en.wikipedia.org/w/index.php?title=House_of_Burgesses&dir=prev&offset=20071117205851&limit=5&action=history .  This only appears to affect old contributions.
Comment 1 db [inactive,noenotif] 2012-03-03 10:44:07 UTC
Special:Contributions is getting the size from the parent rev by using the rev_parent_id field in the database. Maybe in this case the parent_id is not populate.
Comment 2 Jarry1250 2012-03-04 22:39:36 UTC
(In reply to comment #1)
> Special:Contributions is getting the size from the parent rev by using the
> rev_parent_id field in the database. Maybe in this case the parent_id is not
> populate.

Seems to be bang on the money. rev_parent_id is not fully populated, and each of these bad diff sizes correlates to NULL. Page creations (presumably what this is conflating NULL with) in fact have 0 as their parent_id. 

As for the fix, I think a good pro-tem measure would be to not display the erroneous character changes, and then to look at properly populating the parent_id field. Trying to seek backwards to do generate the parent_id on the fly seems very inefficient. (Incidentally, the watchlist and RC look at the RC table, which has old_bytes and new_bytes. Unfortunately we shan't be able to replicate that behaviour here.)
Comment 3 Jarry1250 2012-03-04 23:19:38 UTC
Actually upon further examination on a test wiki, merely change rev_parent_id to NULL does not seem to artificially create the problem. So it seems that correlation does not imply causation...
Comment 4 Jarry1250 2012-03-04 23:26:01 UTC
Per the wrong diff size on https://en.wikipedia.org/w/index.php?title=Milton_Keynes&action=history&year=&month=-1&tagfilter=possible+vandalism (reported on en.wp's VPT), this seems to be a wider problem, where the history page simply does not try hard enough to establish the previous revision.
Comment 5 Bawolff (Brian Wolff) 2012-03-04 23:52:09 UTC
(In reply to comment #4)
> Per the wrong diff size on
> https://en.wikipedia.org/w/index.php?title=Milton_Keynes&action=history&year=&month=-1&tagfilter=possible+vandalism
> (reported on en.wp's VPT), this seems to be a wider problem, where the history
> page simply does not try hard enough to establish the previous revision.

This is probably a separate bug. (Related to r100722)
Comment 6 Jarry1250 2012-03-05 00:02:08 UTC
(In reply to comment #5)
> This is probably a separate bug. (Related to r100722)

[edit conflict note: agreed :) ]

Okay, so there's two different effects at work here. The one that prompted this
thread is simple enough: line 795 of SpecialContributions.php reads:

$parentLen = isset( $this->mParentLens[$row->rev_parent_id] ) ?
$this->mParentLens[$row->rev_parent_id] : 0;

Thus turning a NULL ("never recorded") into a 0 ("page creation").

Comment #2 by me outlines what I think should happen here. The other, related
issue (which I mentioned in comment #4), I have split off into bug #34978.
Comment 7 Jarry1250 2012-03-05 00:07:43 UTC
(In reply to comment #3)
> Actually upon further examination on a test wiki, merely change rev_parent_id
> to NULL does not seem to artificially create the problem. So it seems that
> correlation does not imply causation...

Oh, apologies for the bugspam, but I really should retract that, since I was looking at the wrong page to test. This bug *is* perfectly reproducible using rev_parent_id, just to confirm.
Comment 8 Bawolff (Brian Wolff) 2012-03-05 00:54:06 UTC
Made the code more tolerant of a null rev_parent_id in r112995.

Marking bug fixed. I think Jarry1250 is writing another bug requesting db cleanup for rev_parent_id.
Comment 9 Jarry1250 2012-03-05 00:58:02 UTC
I am indeed - bug #34981.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links