MediaWiki master
RecompressTracked Class Reference

Maintenance script that moves blobs indexed by trackBlobs.php to a specified list of destination clusters, and recompresses them in the process. More...

Collaboration diagram for RecompressTracked:

Public Member Functions

 __construct (array $options)
 
 critical (string $msg)
 
 debug (string $msg)
 
 execute ()
 Execute parent or child depending on the isChild option.
 
 executeChild ()
 Main entry point for worker processes.
 
 executeParent ()
 Execute the parent process.
 
 getTargetCluster ()
 Returns the name of the next target cluster.
 
 info (string $msg)
 
 moveTextRow ( $textId, $url)
 Atomic move operation.
 

Static Public Member Functions

static getOptionsWithArgs ()
 
static newFromCommandLine (array $args, array $options)
 

Public Attributes

int $batchSize = 1000
 
int false $childId = false
 
resource[] $childPipes
 
resource[] $childProcs
 
bool $copyOnly = false
 
string $criticalLog = null
 
string $debugLog = null
 
string[] $destClusters
 
string $infoLog = null
 
bool $isChild = false
 
bool $noCount = false
 
int $numBatches = 0
 
int $numProcs = 1
 
int $orphanBatchSize = 1000
 
class string< HistoryBlob$orphanBlobClass
 
class string< HistoryBlob$pageBlobClass
 
int $prevChildId
 
int $reportingInterval = 10
 
ExternalStoreDB $store
 

Detailed Description

Maintenance script that moves blobs indexed by trackBlobs.php to a specified list of destination clusters, and recompresses them in the process.

Definition at line 47 of file recompressTracked.php.

Constructor & Destructor Documentation

◆ __construct()

RecompressTracked::__construct ( array $options)

Definition at line 122 of file recompressTracked.php.

Member Function Documentation

◆ critical()

RecompressTracked::critical ( string $msg)

Definition at line 156 of file recompressTracked.php.

◆ debug()

RecompressTracked::debug ( string $msg)

Definition at line 142 of file recompressTracked.php.

References wfDebug().

◆ execute()

RecompressTracked::execute ( )

Execute parent or child depending on the isChild option.

Definition at line 184 of file recompressTracked.php.

◆ executeChild()

RecompressTracked::executeChild ( )

Main entry point for worker processes.

Definition at line 456 of file recompressTracked.php.

◆ executeParent()

RecompressTracked::executeParent ( )

Execute the parent process.

Definition at line 195 of file recompressTracked.php.

◆ getOptionsWithArgs()

static RecompressTracked::getOptionsWithArgs ( )
static

Definition at line 107 of file recompressTracked.php.

References $optionsWithArgs.

◆ getTargetCluster()

RecompressTracked::getTargetCluster ( )

Returns the name of the next target cluster.

Returns
string

Definition at line 640 of file recompressTracked.php.

◆ info()

RecompressTracked::info ( string $msg)

Definition at line 149 of file recompressTracked.php.

◆ moveTextRow()

RecompressTracked::moveTextRow ( $textId,
$url )

Atomic move operation.

Write the new URL to the text table and set the bt_moved flag.

This is done in a single transaction to provide restartable behavior without data loss.

The transaction is kept short to reduce locking.

Parameters
int$textId
string$url

Definition at line 566 of file recompressTracked.php.

References $url.

◆ newFromCommandLine()

static RecompressTracked::newFromCommandLine ( array $args,
array $options )
static

Definition at line 111 of file recompressTracked.php.

Member Data Documentation

◆ $batchSize

int RecompressTracked::$batchSize = 1000

Definition at line 51 of file recompressTracked.php.

◆ $childId

int false RecompressTracked::$childId = false

Definition at line 75 of file recompressTracked.php.

◆ $childPipes

resource [] RecompressTracked::$childPipes

Definition at line 65 of file recompressTracked.php.

◆ $childProcs

resource [] RecompressTracked::$childProcs

Definition at line 67 of file recompressTracked.php.

◆ $copyOnly

bool RecompressTracked::$copyOnly = false

Definition at line 71 of file recompressTracked.php.

◆ $criticalLog

string RecompressTracked::$criticalLog = null

Definition at line 80 of file recompressTracked.php.

◆ $debugLog

string RecompressTracked::$debugLog = null

Definition at line 78 of file recompressTracked.php.

◆ $destClusters

string [] RecompressTracked::$destClusters

Definition at line 49 of file recompressTracked.php.

◆ $infoLog

string RecompressTracked::$infoLog = null

Definition at line 79 of file recompressTracked.php.

◆ $isChild

bool RecompressTracked::$isChild = false

Definition at line 73 of file recompressTracked.php.

◆ $noCount

bool RecompressTracked::$noCount = false

Definition at line 77 of file recompressTracked.php.

◆ $numBatches

int RecompressTracked::$numBatches = 0

Definition at line 59 of file recompressTracked.php.

◆ $numProcs

int RecompressTracked::$numProcs = 1

Definition at line 57 of file recompressTracked.php.

◆ $orphanBatchSize

int RecompressTracked::$orphanBatchSize = 1000

Definition at line 53 of file recompressTracked.php.

◆ $orphanBlobClass

class string<HistoryBlob> RecompressTracked::$orphanBlobClass

Definition at line 63 of file recompressTracked.php.

◆ $pageBlobClass

class string<HistoryBlob> RecompressTracked::$pageBlobClass

Definition at line 61 of file recompressTracked.php.

◆ $prevChildId

int RecompressTracked::$prevChildId

Definition at line 69 of file recompressTracked.php.

◆ $reportingInterval

int RecompressTracked::$reportingInterval = 10

Definition at line 55 of file recompressTracked.php.

◆ $store

ExternalStoreDB RecompressTracked::$store

Definition at line 82 of file recompressTracked.php.


The documentation for this class was generated from the following file: