Page MenuHomePhabricator

ApiQueryUserContributions Revision::getParentLengths wrong load balancing db connection
Closed, ResolvedPublic


This is very similiar to Bug 59987 and may need a similar fix.

ApiQueryContributions::execute calls Revision::getParentLengths thus:

$this->parentLens = Revision::getParentLengths( $this->getDB(), $revIds );

The DB handle returned by getDB() is initialized previously to use the 'contributions' name for the database load balancer. This is appropriate for ApiQueryContributions itself but less-so for Revision::getParentLengths as the latter query is quite different and limits the optimization options in the back end.

Consider passing a second normal slave connection instead.

Version: 1.23.0
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 2:59 AM
bzimport set Reference to bz61982.
bzimport added a subscriber: Unknown Object (MLST).
Springle created this task.Feb 27 2014, 4:04 AM

Change 116286 had a related patch set uploaded by Umherirrender:
Use a secondary db connection for Revsion::getParentLength in api

Change 116286 merged by Springle:
Use a secondary db connection for Revsion::getParentLength in api

bd808 moved this task from Tag to Archive on the Performance board.Mar 11 2015, 7:30 PM