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
F18423826: D15661.diff
Sat, Aug 30, 8:10 PM
F18360584: D15661.id.diff
Wed, Aug 27, 10:48 AM
F18350496: D15661.diff
Tue, Aug 26, 7:52 PM
F18141120: D15661.id37745.diff
Aug 14 2025, 6:05 AM
F17817974: D15661.id37747.diff
Jul 26 2025, 12:01 AM
F17808353: D15661.id.diff
Jul 25 2025, 3:53 PM
F17805151: D15661.id37745.diff
Jul 25 2025, 12:16 PM
Unknown Object (File)
Jun 22 2025, 12:27 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.