HomePhabricator

When no master database is configured, automatically degrade to read-only mode

Description

When no master database is configured, automatically degrade to read-only mode

Summary: Ref T4571. If cluster.databases is configured but only has replicas, implicitly drop to read-only mode and send writes to a replica.

Test Plan:

  • Disabled the master, saw Phabricator automatically degrade into read-only mode against replicas.
  • (Also tested: explicit read-only mode, non-cluster mode, properly configured cluster mode).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4571

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