Le 30/10/2015 06:23, Pine W a écrit :
Antony–22 raised a question about accounting for
"new articles" that are
moved from other namespaces to article space. For the purposes of
counting total articles, I'm guessing that these are properly accounted
for as deltas to the total, even if they're not considered new articles
for the purpose of NPP under Special:NewPages. Is that correct?
The article count is vastly inaccurate. Mostly because operations on
pages are not atomic with the update count operation and, all such
operations are not entirely determined nor do they have an associated
required hit count action.
I can't remember the code, but I am pretty sure we had a few race
conditions. An example could be:
count: 100
create article
delete article concurrently
delete article action updates counter (100 - 1 => 99)
create article updates count based on old reference (100 + 1 => 101)
It should be a zero sum, but since the creation still referred to the
old count, the counter ends up gaining an article.
Don't quote me. The code has probably changed a lot and might not be
subject to race conditions any more.
I did ran updateArticleCounts.php on purpose on frwiki just before it
hits a milestone (maybe 100k). That resulted either in a regression
(back to 98k) or a bump (hey we already are at 102k).
That confused a lot of people and we spent a good chunk of time to
determine which article actually has hit the milestone (ended up picking
a nice one created in that time window).
updateArticleCount.php runs automatically on the 21th of each month
https://phabricator.wikimedia.org/T68867
--
Antoine "hashar" Musso