48 return parent::getWeightScale( $index, $conn );
52 if ( $this->warmCacheRatio > 0 ) {
53 $res = $conn->query(
'SHOW STATUS', __METHOD__ );
54 $s =
$res ? $conn->fetchObject(
$res ) :
false;
56 $host = $this->lb->getServerName( $index );
57 $this->replLogger->error( __METHOD__ .
": could not get status for $host" );
60 if (
$s->Innodb_buffer_pool_pages_total > 0 ) {
61 $ratio =
$s->Innodb_buffer_pool_pages_data /
$s->Innodb_buffer_pool_pages_total;
66 $weight *= min( $ratio / $this->warmCacheRatio, 1.0 );