Homec4science

Add a read-only flag to database connections

Authored by epriestley <git@epriestley.com> on Apr 9 2016, 00:12.

Description

Add a read-only flag to database connections

Summary:
Ref T4571. This allows individual connections to be flagged as "read-only". If we try to send writes over a read-only connection, the connection layer throws an exception.

This is part of moving toward a world where we degrade gracefully if the master database is unreachable, and can spread reads to replicas.

Test Plan: See next revision, which adds a basic read-only mode.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4571

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

Details

Committed
epriestley <git@epriestley.com>Apr 9 2016, 13:15
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU22a0253e08fd: Allow ConduitClient to use OAuth access tokens for authentication
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU1dddbacbb252: Add a read-only flag to database connections (authored by epriestley <git@epriestley.com>).Apr 9 2016, 13:15