예제 #1
0
 /**
  * Notify the ChronologyProtector that the LoadBalancer is about to shut
  * down. Saves replication positions.
  *
  * @param LoadBalancer $lb
  */
 function shutdownLB($lb)
 {
     if (session_id() != '' && $lb->getServerCount() > 1) {
         $masterName = $lb->getServerName(0);
         if (!isset($this->shutdownPos[$masterName])) {
             $pos = $lb->getMasterPos();
             $info = $lb->parentInfo();
             wfDebug(__METHOD__ . ": LB " . $info['id'] . " has master pos {$pos}\n");
             $this->shutdownPos[$masterName] = $pos;
         }
     }
 }