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
F15414254: D15661.diff
Wed, Mar 19, 11:43 PM
F15406664: D15661.id.diff
Tue, Mar 18, 1:11 PM
F15405324: D15661.id37745.diff
Tue, Mar 18, 11:07 AM
F15367334: D15661.id.diff
Tue, Mar 11, 5:26 PM
Unknown Object (File)
Sun, Mar 2, 2:03 PM
Unknown Object (File)
Mon, Feb 24, 9:04 AM
Unknown Object (File)
Thu, Feb 20, 10:40 AM
Unknown Object (File)
Feb 16 2025, 6:37 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.