Merge "Use utf8 charset for searchindex MySQL table"
[lhc/web/wiklou.git] / includes / db / LBFactory_Multi.php
index 1c33cdc..3043946 100644 (file)
@@ -145,15 +145,15 @@ class LBFactory_Multi extends LBFactory {
                $section = $this->getSectionForWiki( $wiki );
                if ( !isset( $this->mainLBs[$section] ) ) {
                        $lb = $this->newMainLB( $wiki, $section );
-                       $this->chronProt->initLB( $lb );
                        $lb->parentInfo( array( 'id' => "main-$section" ) );
+                       $this->chronProt->initLB( $lb );
                        $this->mainLBs[$section] = $lb;
                }
                return $this->mainLBs[$section];
        }
 
        /**
-        * @param String $cluster
+        * @param string $cluster
         * @param bool $wiki
         * @throws MWException
         * @return LoadBalancer
@@ -181,6 +181,7 @@ class LBFactory_Multi extends LBFactory {
                if ( !isset( $this->extLBs[$cluster] ) ) {
                        $this->extLBs[$cluster] = $this->newExternalLB( $cluster, $wiki );
                        $this->extLBs[$cluster]->parentInfo( array( 'id' => "ext-$cluster" ) );
+                       $this->chronProt->initLB( $this->extLBs[$cluster] );
                }
                return $this->extLBs[$cluster];
        }
@@ -296,6 +297,9 @@ class LBFactory_Multi extends LBFactory {
                foreach ( $this->mainLBs as $lb ) {
                        $this->chronProt->shutdownLB( $lb );
                }
+               foreach ( $this->extLBs as $extLB ) {
+                       $this->chronProt->shutdownLB( $extLB );
+               }
                $this->chronProt->shutdown();
                $this->commitMasterChanges();
        }