Homec4science

Detect replicating masters and fatal (also, warn on nonreplicating replicas)

Authored by epriestley <git@epriestley.com> on Nov 21 2016, 16:06.

Description

Detect replicating masters and fatal (also, warn on nonreplicating replicas)

Summary:
Ref T10759. Check master/replica status during startup.

After D16903, this also means that we check this status after a database comes back online after being unreachable.

If a master is replicating, fatal (since this can do a million kinds of bad things).

If a replica is not replicating, warn (this just means the replica is behind so some data is at risk).

Also: if your masters were actually configured properly (mine weren't until this change detected it), we would throw away patches as we applied them, so they would only apply to the first master. Instead, properly apply all migration patches to all masters.

Test Plan:

  • Started Phabricator with a replicating master, got a fatal.
  • Stopped replication on a replica, got a warning.
  • With two non-replicating masters, upgraded storage.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10759

Differential Revision: https://secure.phabricator.com/D16904

Details

Committed
epriestley <git@epriestley.com>Nov 22 2016, 00:55
Pushed
aubortJan 31 2017, 17:16
Parents
rPHbc4187d70949: When we "discover" new fatal setup issues, stop serving traffic
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH326d5bf8004e: Detect replicating masters and fatal (also, warn on nonreplicating replicas) (authored by epriestley <git@epriestley.com>).Nov 22 2016, 00:55