From: jenkins-bot Date: Fri, 8 Mar 2019 00:51:25 +0000 (+0000) Subject: Merge "objectcache: add $flags argument to BagOStuff::delete()" X-Git-Tag: 1.34.0-rc.0~2605 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=db1f41172f6f7670b87c96bfb11a2cab07ac19ac;p=lhc%2Fweb%2Fwiklou.git Merge "objectcache: add $flags argument to BagOStuff::delete()" --- db1f41172f6f7670b87c96bfb11a2cab07ac19ac diff --cc includes/objectcache/SqlBagOStuff.php index fad7da9c79,522233b555..eeb7355bc5 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@@ -732,8 -731,22 +731,15 @@@ 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->setAndLogDBError( $exception ); + } + + /** + * @param DBError $exception + */ + private function setAndLogDBError( DBError $exception ) { $this->logger->error( "DBError: {$exception->getMessage()}" ); if ( $exception instanceof DBConnectionError ) { $this->setLastError( BagOStuff::ERR_UNREACHABLE );