Index: trunk/phase3/includes/db/LoadBalancer.php |
— | — | @@ -346,7 +346,7 @@ |
347 | 347 | wfProfileIn( __METHOD__ ); |
348 | 348 | $this->mWaitForPos = $pos; |
349 | 349 | for ( $i = 1; $i < count( $this->mServers ); $i++ ) { |
350 | | - $this->doWait( $i ); |
| 350 | + $this->doWait( $i , true ); |
351 | 351 | } |
352 | 352 | wfProfileOut( __METHOD__ ); |
353 | 353 | } |
— | — | @@ -367,12 +367,20 @@ |
368 | 368 | /** |
369 | 369 | * Wait for a given slave to catch up to the master pos stored in $this |
370 | 370 | */ |
371 | | - function doWait( $index ) { |
| 371 | + function doWait( $index, $open ) { |
372 | 372 | # Find a connection to wait on |
373 | 373 | $conn = $this->getAnyOpenConnection( $index ); |
374 | 374 | if ( !$conn ) { |
375 | | - wfDebug( __METHOD__ . ": no connection open\n" ); |
376 | | - return false; |
| 375 | + if ( !$open ) { |
| 376 | + wfDebug( __METHOD__ . ": no connection open\n" ); |
| 377 | + return false; |
| 378 | + } else { |
| 379 | + $conn = $this->openConnection( $index ); |
| 380 | + if ( !$conn ) { |
| 381 | + wfDebug( __METHOD__ . ": failed to open connection\n" ); |
| 382 | + return false; |
| 383 | + } |
| 384 | + } |
377 | 385 | } |
378 | 386 | |
379 | 387 | wfDebug( __METHOD__.": Waiting for slave #$index to catch up...\n" ); |
Property changes on: trunk/phase3/includes/db/LoadBalancer.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
380 | 388 | Merged /branches/new-installer/phase3/includes/db/LoadBalancer.php:r43664-66004 |
381 | 389 | Merged /branches/wmf-deployment/includes/db/LoadBalancer.php:r53381 |
382 | 390 | Merged /branches/wmf/1.17wmf1/includes/db/LoadBalancer.php:r83555 |
383 | 391 | Merged /branches/REL1_15/phase3/includes/db/LoadBalancer.php:r51646 |
384 | 392 | Merged /branches/sqlite/includes/db/LoadBalancer.php:r58211-58321 |