Page MenuHomePhabricator

D20351.diff
No OneTemporary

D20351.diff

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

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)

Event Timeline