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
F13985923: D15661.diff
Sun, Oct 20, 11:36 PM
F13981401: D15661.id37745.diff
Sat, Oct 19, 4:17 PM
F13977583: D15661.id37747.diff
Fri, Oct 18, 7:14 PM
F13974709: D15661.id37747.diff
Fri, Oct 18, 6:57 AM
Unknown Object (File)
Thu, Oct 10, 2:41 AM
Unknown Object (File)
Oct 7 2024, 1:40 AM
Unknown Object (File)
Oct 7 2024, 1:40 AM
Unknown Object (File)
Oct 7 2024, 1:40 AM
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.