In the current configuration, MediaWiki gets the master DB host and a list of slaves. However, this list is per-DC and does not denote whether the master in the config is simply the master of the local DC or the overall ("true") master. This information is needed in order to be able to take appropriate actions when separating reads/writes from the DB, as well as being able to interpret and handle replication lags correctly.
Description
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | aaron | T88445 MediaWiki active/active datacenter investigation and work (tracking) | |||
| Declined | aaron | T221159 FY18/19 TEC1.6 Q4: Improve or replace the usage of GTID_WAIT with pt-heartbeat in MW | |||
| Resolved | tstarling | T224419 Allow MediaWiki to know the "real" DB master |
Event Timeline
We'll also want to document here (and possibly figure out first, if not currently known) why it is that we specify a local replica as "master" in wmf-config for secondary DCs.
MediaWiki itself and the rdmbs library do not have any concept for a local/stand-by master. Right now the wmf-config is using a local replica for this field, which to my knowledge was a safety precaution to use until a time we have more confidence in our switchover procedures – to be phased out at some point before we enable multi-dc/active-active traffic.
So as written, this task is to either:
- Update wmf-config to configure MW the way MW currently supports being configured: It must be configured with the real master, not a local replica. The reason this isn't an issue right now is because the secondary config is essentially never used, because we're not multi-dc/active-active yet.
- Document a reason for why MW would need to know about a local stand-by master, add a feature to MW for configuring that separately from the current master config, update wmf-config to set the real master as the master, and then use this new config for the stand-by master.
I believe because it is technically a master (or an intermediate read-only master if you will, maybe we can call it DC master) for the rest of replicas in that given DC.
MediaWiki now sees the real master in the secondary DC, and can connect to it with SSL if desired.