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
Unknown Object (File)
Sat, Feb 1, 8:29 AM
Unknown Object (File)
Tue, Jan 28, 10:41 PM
Unknown Object (File)
Tue, Jan 28, 1:12 AM
Unknown Object (File)
Fri, Jan 24, 12:53 PM
Unknown Object (File)
Fri, Jan 17, 2:33 PM
Unknown Object (File)
Jan 3 2025, 7:30 AM
Unknown Object (File)
Dec 11 2024, 9:42 PM
Unknown Object (File)
Dec 8 2024, 12:10 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.