Page MenuHomePhabricator

Special:Random does not include all pages on large wikis
Open, LowPublicFeature

Description

Special:Random gives you a special page from the wiki. This depends on a random number between 0 and 1 (page_random) stored in the page table with 12 decimal places. This is created using wfRandom() in GlobalFunctions.php, where the comment states: "Get a random decimal value between 0 and 1, in a way not likely to give duplicate values for any realistic number of articles.". This is not true. For example on de.wikipedia we currently have more than 30 articles having the same page_random like another article.

Of course you can create 1.000.000.000.000 different random numbers with 12 decimal places, but it's not unlikely to have a number twice when generating them using a random function.

This is not a big problem, but there are currently some articles in de.wikipedia which will never occur when clicking "Random article". I think at en.wikipedia this is the same and so its not really a "random article".

Maybe it would be a solution to check, if the random number already exists and take another one, if yes. As said, there are enough possibilities...


Version: unspecified
Severity: enhancement

Details

Reference
bz20208