Remove getLocalServerInstance try/catch in UIDGenerator and DBLockManager
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 2 Nov 2015 21:45:43 +0000 (21:45 +0000)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 2 Nov 2015 22:16:05 +0000 (22:16 +0000)
Follows-up 17c91ad610 in which the exception was removed.

Change-Id: If0c8465d0e04f69f29f3f2602dac7ae4538f7542

includes/filebackend/lockmanager/DBLockManager.php
includes/utils/UIDGenerator.php

index 1c389c3..42ebb46 100644 (file)
@@ -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;
                        }
                }
index f781435..26eebcd 100644 (file)
@@ -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 );