Page MenuHomePhabricator

Rethink shared table configuration setup for synching repo and client
Closed, ResolvedPublic

Description

Rethink the current shared table setup for the WMF cluster.


Version: unspecified
Severity: normal
Whiteboard: storypoints: 8

Details

Reference
bz38972

Event Timeline

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

wgshareddb setting currently can only point to one database. If you want to share with multiple databases, this wouldn't work. The target db has to be configured per table.

The relevant settings are: $wgSharedTables, $wgSharedDB, and $wgSharedPrefix. Note that $wgSharedTables contains array( 'user', 'user_properties' ), but it's not used unless $wgSharedDB is not empty.

To make this more flexible, all access to these veriables should be replaced by access to static functions that can then be changed to work based on different configuration variables (though the old style config should still be supported). This seems feasible, the hardest decision being how to best structure the new setup. An array with table names as keys and records contiaining database name and prefix would be one way:

$wgSharedTables = array(
  'user' => array( 'dbname' => 'foo', 'prefix' => 'bla_' )
)

After some consideration, solving this is not required for Wikidata deployment: I could not find any reference to $wgSharedDB on http://noc.wikimedia.org/conf/. Apparently, GlobalUsage uses it's own "shared" table config, $wgGlobalUsageTable, not $wgSharedTables, so it doesn't conflict with Wikibase using $wgSharedTables.

However:

a) We should still consider using our own config for sharing tables

b) it would still be nice if $wgSharedTables became more flexible and powerful

I suggest we re-categorize this as a core feature request and remove it from the Wikidata backlog.

This needs to be done in core.

lowering prio and unassignig. this is not critical and should be discussed again before being picked up again.