Page MenuHomePhabricator

Add a read-only flag to database connections

Authored by epriestley on Apr 8 2016, 10:25 PM.
Referenced Files
Unknown Object (File)
Wed, Aug 10, 1:21 AM
Unknown Object (File)
Mon, Aug 8, 4:44 PM
Unknown Object (File)
Sat, Aug 6, 5:42 AM
Unknown Object (File)
Tue, Aug 2, 4:53 PM
Unknown Object (File)
Sun, Jul 31, 11:36 AM
Unknown Object (File)
Sun, Jul 24, 6:48 AM
Unknown Object (File)
Thu, Jul 21, 7:34 AM
Unknown Object (File)
Jul 4 2022, 11:50 PM



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.

Diff Detail

rPHU libphutil
Lint Not Applicable
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Add a read-only flag to database connections.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Apr 9 2016, 5:06 AM
This revision was automatically updated to reflect the committed changes.