Index: trunk/phase3/maintenance/storage/trackBlobs.php |
— | — | @@ -249,7 +249,16 @@ |
250 | 250 | foreach ( $this->clusters as $cluster ) { |
251 | 251 | echo "Searching for orphan blobs in $cluster...\n"; |
252 | 252 | $lb = wfGetLBFactory()->getExternalLB( $cluster ); |
253 | | - $extDB = $lb->getConnection( DB_SLAVE ); |
| 253 | + try { |
| 254 | + $extDB = $lb->getConnection( DB_SLAVE ); |
| 255 | + } catch ( DBConnectionError $e ) { |
| 256 | + if ( strpos( $e->error, 'Unknown database' ) !== false ) { |
| 257 | + echo "No database on $cluster\n"; |
| 258 | + } else { |
| 259 | + echo "Error on $cluster: " . $e->getMessage() . "\n"; |
| 260 | + } |
| 261 | + continue; |
| 262 | + } |
254 | 263 | $startId = 0; |
255 | 264 | $batchesDone = 0; |
256 | 265 | $actualBlobs = gmp_init( 0 ); |