Page MenuHomePhabricator

Add a read-only flag to database connections
ClosedPublic

Authored by epriestley on Apr 8 2016, 10:25 PM.
Tags
None
Referenced Files
F19816598: D15661.id37747.diff
Thu, Mar 5, 6:57 AM
F19757274: D15661.id37745.diff
Tue, Feb 17, 7:39 PM
F19757165: D15661.id37745.diff
Tue, Feb 17, 7:37 PM
F19600378: D15661.id.diff
Feb 3 2026, 3:23 AM
F19543015: D15661.id37747.diff
Jan 22 2026, 2:36 PM
F19543014: D15661.id.diff
Jan 22 2026, 2:36 PM
F19530162: D15661.diff
Jan 19 2026, 9:14 PM
F19530159: D15661.diff
Jan 19 2026, 9:14 PM
Subscribers
None

Details

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.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
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.