Page MenuHomePhabricator

Wikibase Special:EntityData has 2 parameters that do the same thing
Closed, ResolvedPublic3 Estimated Story Points

Description

Currently Special:EntityData has 2 different ways to request a specific revision.

https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/master/repo/includes/LinkedData/EntityDataRequestHandler.php#L200-L201

"revision" and "oldid"
revision is used far more than oldid T220826#5182044 & T220826#5185202

I propose that we either entirely remove one, or redirect requests that use one to use the other.

The motivations behind this change would be:

  • remove the redundancy / confusions of looking at requests that have different parameters that do the same thing
  • Allow for more cache hits (currently is revision=1 is used and then oldid=1 is used, this results in an unneeded varnish miss)

Event Timeline

I don't think we want to remove one completely as there are probably enough uses out there. If we can redirect one to the other that seems fine from my side though.

I took a look at the usage on a current day:

revision	10710135
none	7665964
oldid	2

So oldid is barely used, and revisions is used lots.
Thus revision is probably the main one we should use / keep

Generated with P8524

@Addshore that sounds like an easy choice then. Would you say it makes sense to see number for some past month or so, to be 100% sure it was not some kind of one-day anomaly? On one hand, the difference seems so huge that I could see that it is not necessary, OTOH it is this huge difference which makes me think about an anomaly in the first place. To be clear, I don't have a strong preference on doing further analysis topic.

Looking at the query in P8524, do I interpret it right that oldid use is only counted when the revision parameter is not used? Do we care about cases when both revision and oldid are part of the input?

Looking at the query in P8524, do I interpret it right that oldid use is only counted when the revision parameter is not used? Do we care about cases when both revision and oldid are part of the input?

Correct

I altered the query to take that into account and ran it for the whole of this month so far.
P8531

revisionparamoldidparamrequests
00170005141
10149359378
012

Not an anomaly, infact, the fact that I even managed to find the 2 requests that used the oldid param is quite amazing, heh...

Thank you sir. So yes, it does look like oldid could go. And probably should, as what's the point of the additional complexity and source of errors, if it is not intended to be used?

Indeed, let's get rid of oldid :)

alaa_wmde set the point value for this task to 3.Jul 9 2019, 12:12 PM

We decided to remove the legacy redundant oldid. following the usual BC announcement process

Change 523790 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/Wikibase@master] Drop redundant oldid from Special:EntityData

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

Change 523790 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Drop redundant "oldid" argument from Special:EntityData

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