Web browser: ---
Bug ID: 59987
Summary: SpecialContributions Revision::getParentLengths wrong
load balancing db connection
Component: Special pages
Mobile Platform: ---
SpecialContributions::doBatchLookups() calls Revision::getParentLengths() like
Revision::getParentLengths( $this->getDatabase(), $revIds );
getDatabase returns $this->mDb which is set in the SpecialContributions
constructor using 'contributions' to identify it to the database load balancer:
$this->mDb = wfGetDB( DB_SLAVE, 'contributions' );
Passing mDb to getParentLengths is not ideal as the query type is quite
different and limits what can be done in the backend. Consider passing a normal
unnamed slave connection instead.
On WMF production shards mDb is usually a connection to a slave set aside for
special queries on a shard. One of the possible optimizations that can be
applied to such slaves is table partitioning based on range or hash of rev_user
(this approach is proving effective for the similar LogPager queries).
Unfortunately partitioning increases the cost of some other types of queries
including the huge batched lookups generated by getParentLengths. It would be
nice to have the best of both worlds.
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
Wikibugs-l mailing list