From 8a821011cee395a1dcc4b1164d3d45a38b0a3f7a Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Mon, 2 Nov 2015 21:45:43 +0000 Subject: [PATCH] Remove getLocalServerInstance try/catch in UIDGenerator and DBLockManager Follows-up 17c91ad610 in which the exception was removed. Change-Id: If0c8465d0e04f69f29f3f2602dac7ae4538f7542 --- includes/filebackend/lockmanager/DBLockManager.php | 7 +------ includes/utils/UIDGenerator.php | 6 +----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/includes/filebackend/lockmanager/DBLockManager.php b/includes/filebackend/lockmanager/DBLockManager.php index 1c389c3c29..42ebb46e6b 100644 --- a/includes/filebackend/lockmanager/DBLockManager.php +++ b/includes/filebackend/lockmanager/DBLockManager.php @@ -95,12 +95,7 @@ abstract class DBLockManager extends QuorumLockManager { if ( count( $bucket ) > 1 ) { // multiple peers // Tracks peers that couldn't be queried recently to avoid lengthy // connection timeouts. This is useless if each bucket has one peer. - try { - $this->statusCache = ObjectCache::getLocalServerInstance(); - } catch ( Exception $e ) { - trigger_error( __CLASS__ . - " using multiple DB peers without apc, xcache, or wincache." ); - } + $this->statusCache = ObjectCache::getLocalServerInstance(); break; } } diff --git a/includes/utils/UIDGenerator.php b/includes/utils/UIDGenerator.php index f781435b76..26eebcd415 100644 --- a/includes/utils/UIDGenerator.php +++ b/includes/utils/UIDGenerator.php @@ -282,11 +282,7 @@ class UIDGenerator { // Counter values would not survive accross script instances in CLI mode. $cache = null; if ( ( $flags & self::QUICK_VOLATILE ) && PHP_SAPI !== 'cli' ) { - try { - $cache = ObjectCache::getLocalServerInstance(); - } catch ( Exception $e ) { - // not supported - } + $cache = ObjectCache::getLocalServerInstance(); } if ( $cache ) { $counter = $cache->incr( $bucket, $count ); -- 2.20.1