summaryrefslogtreecommitdiff
path: root/maintenance/storage
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/storage')
-rw-r--r--maintenance/storage/blobs.sql2
-rw-r--r--maintenance/storage/recompressTracked.php8
-rw-r--r--maintenance/storage/trackBlobs.php12
3 files changed, 16 insertions, 6 deletions
diff --git a/maintenance/storage/blobs.sql b/maintenance/storage/blobs.sql
index 0b1b82d8..623dd7bf 100644
--- a/maintenance/storage/blobs.sql
+++ b/maintenance/storage/blobs.sql
@@ -4,5 +4,5 @@ CREATE TABLE /*$wgDBprefix*/blobs (
blob_id integer UNSIGNED NOT NULL AUTO_INCREMENT,
blob_text longblob,
PRIMARY KEY (blob_id)
-) ENGINE=MyISAM MAX_ROWS=1000000 AVG_ROW_LENGTH=1000000;
+) ENGINE=MyISAM MAX_ROWS=100000000 AVG_ROW_LENGTH=100000;
diff --git a/maintenance/storage/recompressTracked.php b/maintenance/storage/recompressTracked.php
index 7e4ed1b4..d8d2e4ef 100644
--- a/maintenance/storage/recompressTracked.php
+++ b/maintenance/storage/recompressTracked.php
@@ -333,7 +333,6 @@ class RecompressTracked {
} else {
$this->info( "Moving orphans..." );
}
- $ids = array();
while ( true ) {
$res = $dbr->select( 'blob_tracking',
@@ -353,6 +352,7 @@ class RecompressTracked {
if ( !$res->numRows() ) {
break;
}
+ $ids = array();
foreach ( $res as $row ) {
$ids[] = $row->bt_text_id;
$i++;
@@ -366,6 +366,12 @@ class RecompressTracked {
array_unshift( $args, 'doOrphanList' );
call_user_func_array( array( $this, 'dispatch' ), $args );
}
+ if ( count( $ids ) ) {
+ $args = $ids;
+ array_unshift( $args, 'doOrphanList' );
+ call_user_func_array( array( $this, 'dispatch' ), $args );
+ }
+
$startId = $row->bt_text_id;
$this->report( 'orphans', $i, $numOrphans );
}
diff --git a/maintenance/storage/trackBlobs.php b/maintenance/storage/trackBlobs.php
index b13faa00..0f25fb94 100644
--- a/maintenance/storage/trackBlobs.php
+++ b/maintenance/storage/trackBlobs.php
@@ -11,7 +11,7 @@ if ( count( $args ) < 1 ) {
exit( 1 );
}
$tracker = new TrackBlobs( $args );
-$tracker->trackBlobs();
+$tracker->run();
class TrackBlobs {
var $clusters, $textClause;
@@ -33,7 +33,7 @@ class TrackBlobs {
}
}
- function trackBlobs() {
+ function run() {
$this->initTrackingTable();
$this->trackRevisions();
$this->trackOrphanText();
@@ -259,14 +259,18 @@ class TrackBlobs {
}
continue;
}
+ $table = $extDB->getLBInfo( 'blobs table' );
+ if ( is_null( $table ) ) {
+ $table = 'blobs';
+ }
$startId = 0;
$batchesDone = 0;
$actualBlobs = gmp_init( 0 );
- $endId = $extDB->selectField( 'blobs', 'MAX(blob_id)', false, __METHOD__ );
+ $endId = $extDB->selectField( $table, 'MAX(blob_id)', false, __METHOD__ );
// Build a bitmap of actual blob rows
while ( true ) {
- $res = $extDB->select( 'blobs',
+ $res = $extDB->select( $table,
array( 'blob_id' ),
array( 'blob_id > ' . $extDB->addQuotes( $startId ) ),
__METHOD__,