Page MenuHomePhabricator

SiteStats shows 0 for job queues not using database
Closed, ResolvedPublic

Description

SiteStats uses:

self::$jobs = $dbr->estimateRowCount( 'job' );

which simply shows 0 if the job queue doesn't use that table (e.g. for the Redis queue).

Example: https://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=statistics shows jobs="0"


Version: 1.22.0
Severity: normal
URL: https://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=statistics

Details

Reference
bz50635

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:05 AM
bzimport set Reference to bz50635.
bzimport added a subscriber: Unknown Object (MLST).

I don't think so. Let's keep that specifically for relational databases (specifically, it seems to boil down to Rob Church's note, "The job queue count shown on Special:Statistics is generated using a clever
trick which avoids an expensive COUNT(*) on the job table. This trick means
that the value will fluctuate, often to the point where it's downright
incorrect.").

The current Redis job queue implementation is totally different (doesn't use a relational database and takes advantage of Redis-specific features).

Change 71966 had a related patch set uploaded by Aaron Schulz:
jobqueue: improved performance of JobQueueGroup::getQueuesWithJobs()

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

  • Bug 51163 has been marked as a duplicate of this bug. ***

Change 71966 merged by jenkins-bot:
jobqueue: improved performance of JobQueueGroup::getQueuesWithJobs()

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