Page MenuHomePhabricator

Strange off-by-one error in Special:Unusedimages at offset 43500 with 500 limit
Open, LowestPublic

Description

Author: bugzilla

Description:
Problematic for a quick script that intends to check how many images are unused. 499 images are listed on this page, and others have viewed the URL to the same results. All prior pages are 500, and several after have 500.


Version: 1.11.x
Severity: minor
URL: http://en.wikipedia.org/w/index.php?title=Special%3AUnusedimages&action=view&limit=500&offset=43500

Details

Reference
bz10153

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:50 PM
bzimport set Reference to bz10153.
bzimport added a subscriber: Unknown Object (MLST).

bugzilla wrote:

Tested the deletion of an image in that range... page showed 499 images again after an image in the displayed range was deleted. Deleted image was not displayed.

I think the algorithm should always be to add the number of images fetched to the offset and retry the API query until it returns 0 images, not to rely on the limit being matched exactly. As comment 2 is hinting, concurrent deletes can cause underfull replies.