Last modified: 2013-06-26 10:36:15 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 T51504, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49504 - ipb_range_start and ipb_range_end should be blank for single-IP blocks
ipb_range_start and ipb_range_end should be blank for single-IP blocks
Status: NEW
Product: MediaWiki
Classification: Unclassified
User blocking (Other open bugs)
1.22.0
All All
: Normal normal (vote)
: ---
Assigned To: Tim Starling
: performance, platformeng
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-12 23:09 UTC by Tim Starling
Modified: 2013-06-26 10:36 UTC (History)
0 users

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


Attachments

Description Tim Starling 2013-06-12 23:09:00 UTC
When ipb_range_start and ipb_range_end were introduced in r11887, they were set to an empty string for single-IP blocks. Identifying ranges which contain a given IP requires scanning, so removing single-IP blocks from the part of the index inhabited by range blocks reduced the amount of scanning which needed to occur.

This was accidentally broken in r17865/r17866, where a call to wfRangeStartEnd(), which rejected single IPs, was replaced with IP::parseRange(), which accepts single IPs.

We now have about 80,000 single-IP blocks on en.wp. 13,000 of them still have an empty ipb_range_start, presumably created before r17866 (all have infinite expiry). The amount of table scanning is proportional to the number of blocks in the user's /16 range: 18 /16 ranges have more than 500 blocks, 61 have more than 100 blocks. The problem may well get worse as IPv6 becomes more common: the IPv6 code also uses a /16 division of index space.

ApiQueryBlocks now depends on the fact that ipb_range_start is populated, and so won't correctly display the 13,000 old blocks. Possibly there is other code that makes the same assumption. Such code should be fixed.
Comment 1 Gerrit Notification Bot 2013-06-12 23:22:17 UTC
Related URL: https://gerrit.wikimedia.org/r/68310 (Gerrit Change Ie229e84b299c357cfe9a2db0a5ba07713aac7597)
Comment 2 Gerrit Notification Bot 2013-06-12 23:32:11 UTC
https://gerrit.wikimedia.org/r/68310 (Gerrit Change Ie229e84b299c357cfe9a2db0a5ba07713aac7597) | change APPROVED and MERGED [by jenkins-bot]

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


Navigation
Links