echo "Usage: php recompressTracked.php [options] <cluster> [... <cluster>...]
Moves blobs indexed by trackBlobs.php to a specified list of destination clusters, and recompresses them in the process. Restartable.
-Options:
- --procs <procs> Set the number of child processes (default 1)
+Options:
+ --procs <procs> Set the number of child processes (default 1)
--copy-only Copy only, do not update the text table. Restart without this option to complete.
--debug-log <file> Log debugging data to the specified file
--info-log <file> Log progress messages to the specified file
/**
* Wait until the selected slave has caught up to the master.
- * This allows us to use the slave for things that were committed in a
- * previous part of this batch process.
+ * This allows us to use the slave for things that were committed in a
+ * previous part of this batch process.
*/
function syncDBs() {
$dbw = wfGetDB( DB_MASTER );
*
* This is done in a single transaction to provide restartable behaviour
* without data loss.
- *
+ *
* The transaction is kept short to reduce locking.
*/
function moveTextRow( $textId, $url ) {
$this->finishIncompleteMoves( array( 'bt_text_id' => $textIds ) );
$this->syncDBs();
}
-
+
$trx = new CgzCopyTransaction( $this, $this->orphanBlobClass );
$res = wfGetDB( DB_SLAVE )->select(
$this->critical( "Error: cannot load revision text for old_id=$textId" );
continue;
}
-
+
if ( !$trx->addItem( $text, $row->old_id ) ) {
$this->debug( "[orphan]: committing blob with " . $trx->getSize() . " rows" );
$trx->commit();
$trx->commit();
}
- /**
+ /**
* Wait for slaves (quietly)
*/
function waitForSlaves() {
// Check to see if the target text_ids have been moved already.
//
- // We originally read from the slave, so this can happen when a single
- // text_id is shared between multiple pages. It's rare, but possible
+ // We originally read from the slave, so this can happen when a single
+ // text_id is shared between multiple pages. It's rare, but possible
// if a delete/move/undelete cycle splits up a null edit.
//
// We do a locking read to prevent closer-run race conditions.