* @see wfWaitForSlaves()
*/
-require( __DIR__ . '/../commandLine.inc' );
-
+require __DIR__ . '/../commandLine.inc';
if ( count( $args ) < 1 ) {
echo "Usage: php trackBlobs.php <cluster> [... <cluster>]\n";
echo "All done.\n";
class TrackBlobs {
- var $clusters, $textClause;
- var $doBlobOrphans;
- var $trackedBlobs = array();
+ public $clusters, $textClause;
+ public $doBlobOrphans;
+ public $trackedBlobs = array();
- var $batchSize = 1000;
- var $reportingInterval = 10;
+ public $batchSize = 1000;
+ public $reportingInterval = 10;
function __construct( $clusters ) {
$this->clusters = $clusters;
$this->textClause .= 'old_text' . $dbr->buildLike( "DB://$cluster/", $dbr->anyString() );
}
}
+
return $this->textClause;
}
if ( !preg_match( '!^DB://(\w+)/(\d+)(?:/([0-9a-fA-F]+)|)$!', $text, $m ) ) {
return false;
}
+
return array(
'cluster' => $m[1],
'id' => intval( $m[2] ),
function findOrphanBlobs() {
if ( !extension_loaded( 'gmp' ) ) {
echo "Can't find orphan blobs, need bitfield support provided by GMP.\n";
+
return;
}