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, Jul 4, 7:19 AM
Unknown Object (File)
Thu, Jul 2, 3:57 PM
Unknown Object (File)
Tue, Jun 30, 1:20 PM
Unknown Object (File)
Sun, Jun 28, 12:48 PM
Unknown Object (File)
Sat, Jun 27, 11:04 PM
Unknown Object (File)
Mon, Jun 22, 12:49 PM
Unknown Object (File)
Jun 2 2026, 1:58 AM
Unknown Object (File)
Apr 7 2026, 10:55 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
Branch
readonly1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 11607
Build 14513: Run Core Tests
Build 14512: arc lint + arc unit

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.