Page MenuHomePhabricator

setup a DB backed parser cache
Closed, DeclinedPublic

Description

The parser cache in production is using a mysql-multiwrite object cache which write to both memcached and a mysql database (pc) (see $wgParserCacheType and $wgObjectCaches['mysql-multiwrite']).

In labs, we only use the CACHE_MEMCACHED, we could use a db as well.

Probably need MariaDB puppet manifests to be adapted just like for bug 53339 (migrate databases to MariaDB).

Details

Reference
bz53457

Related Objects

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:56 AM
bzimport set Reference to bz53457.
bzimport added a subscriber: Unknown Object (MLST).
hashar lowered the priority of this task from Medium to Low.Oct 6 2015, 1:32 PM
hashar updated the task description. (Show Details)
hashar set Security to None.

This got filed in an attempt to make Beta-Cluster-Infrastructure closer to production. It defines an object cache that uses both memcached and mysql:

$wgObjectCaches['mysql-multiwrite'] = [
    'class' => 'MultiWriteBagOStuff',
    'caches' => [
        0 => [
            'factory' => [ 'ObjectCache', 'getInstance' ],
            'args' => [ 'mcrouter' ]
        ],
        1 => [
            'class' => 'SqlBagOStuff',
            'servers' => $pcServers,
            'purgePeriod' => 0,
            'tableName' => 'pc',
            'shards' => 256,
            'reportDupes' => false
        ],
    ],
    'replication' => 'async',
    'reportDupes' => false
];

'wgParserCacheType' => [
    'default' => 'mysql-multiwrite',
    'wikitech' => 'memcached-pecl',
],

Where as on beta we only use memcached:

'wgParserCacheType' => [
    'default' => CACHE_MEMCACHED,
],

Which is probably not a big deal.