From: Aaron Schulz Date: Thu, 7 Mar 2019 21:21:41 +0000 (-0800) Subject: objectcache: remove obsolete code from SqlBagOStuff::handleWriteError() X-Git-Tag: 1.34.0-rc.0~2609^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=ebd1343860579d52077a32f026834877521217b8;p=lhc%2Fweb%2Fwiklou.git objectcache: remove obsolete code from SqlBagOStuff::handleWriteError() Given that the DB classes already check read-only mode and bad transaction states are already handled by 3975e04cf4d, this code was not useful. Change-Id: I4b6e8909196448a12cf74598de0272fa43bdfc62 --- diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index 2866a6c9cf..fad7da9c79 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -732,13 +732,6 @@ class SqlBagOStuff extends BagOStuff { protected function handleWriteError( DBError $exception, IDatabase $db = null, $serverIndex ) { if ( !$db ) { $this->markServerDown( $exception, $serverIndex ); - } elseif ( $db->wasReadOnlyError() ) { - if ( $db->trxLevel() && $this->usesMainDB() ) { - // Errors like deadlocks and connection drops already cause rollback. - // For consistency, we have no choice but to throw an error and trigger - // complete rollback if the main DB is also being used as the cache DB. - throw $exception; - } } $this->logger->error( "DBError: {$exception->getMessage()}" );