Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15413683
D20351.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
980 B
Referenced Files
None
Subscribers
None
D20351.diff
View Options
diff --git a/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php b/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php
--- a/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php
+++ b/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php
@@ -110,6 +110,19 @@
$connection = $replica->newApplicationConnection($database);
$connection->setReadOnly(true);
if ($replica->isReachable($connection)) {
+ if ($master_exception) {
+ // If we ended up here as the result of a failover, log the
+ // exception. This is seriously bad news even if we are able
+ // to recover from it.
+ $proxy_exception = new PhutilProxyException(
+ pht(
+ 'Failed to connect to master database ("%s"), failing over '.
+ 'into read-only mode.',
+ $database),
+ $master_exception);
+ phlog($proxy_exception);
+ }
+
return $connection;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 8:32 PM (4 d, 21 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7706496
Default Alt Text
D20351.diff (980 B)
Attached To
Mode
D20351: When we failover to a replica, log the exception we hit
Attached
Detach File
Event Timeline
Log In to Comment