MediaWiki  1.23.2
TrackBlobs Class Reference

Public Member Functions

 __construct ( $clusters)
 
 checkIntegrity ()
 
 findOrphanBlobs ()
 Scan the blobs table for rows not registered in blob_tracking (and thus not registered in the text table). More...
 
 getTextClause ()
 
 initTrackingTable ()
 
 interpretPointer ( $text)
 
 run ()
 
 trackOrphanText ()
 Scan the text table for orphan text Orphan text here does not imply DB corruption – deleted text tracked by the archive table counts as orphan for our purposes. More...
 
 trackRevisions ()
 Scan the revision table for rows stored in the specified clusters. More...
 

Public Attributes

 $batchSize = 1000
 
 $clusters
 
 $doBlobOrphans
 
 $reportingInterval = 10
 
 $textClause
 
 $trackedBlobs = array()
 

Detailed Description

Definition at line 38 of file trackBlobs.php.

Constructor & Destructor Documentation

◆ __construct()

TrackBlobs::__construct (   $clusters)

Definition at line 46 of file trackBlobs.php.

References $clusters, and as.

Member Function Documentation

◆ checkIntegrity()

TrackBlobs::checkIntegrity ( )

Definition at line 68 of file trackBlobs.php.

References $dbr, $flags, DB_SLAVE, and wfGetDB().

Referenced by run().

◆ findOrphanBlobs()

TrackBlobs::findOrphanBlobs ( )

Scan the blobs table for rows not registered in blob_tracking (and thus not registered in the text table).

Orphan blobs are indicative of DB corruption. They are inaccessible and should probably be deleted.

Definition at line 305 of file trackBlobs.php.

References $e, $lb, $res, array(), as, DB_MASTER, DB_SLAVE, wfGetDB(), and wfGetLBFactory().

Referenced by run().

◆ getTextClause()

TrackBlobs::getTextClause ( )

Definition at line 118 of file trackBlobs.php.

References $dbr, $textClause, as, DB_SLAVE, and wfGetDB().

Referenced by trackOrphanText(), and trackRevisions().

◆ initTrackingTable()

TrackBlobs::initTrackingTable ( )

Definition at line 109 of file trackBlobs.php.

References DB_MASTER, and wfGetDB().

Referenced by run().

◆ interpretPointer()

TrackBlobs::interpretPointer (   $text)

Definition at line 132 of file trackBlobs.php.

References array().

Referenced by trackOrphanText(), and trackRevisions().

◆ run()

TrackBlobs::run ( )

◆ trackOrphanText()

TrackBlobs::trackOrphanText ( )

Scan the text table for orphan text Orphan text here does not imply DB corruption – deleted text tracked by the archive table counts as orphan for our purposes.

Definition at line 219 of file trackBlobs.php.

References $dbr, $res, $textClause, array(), as, DB_MASTER, DB_SLAVE, getTextClause(), interpretPointer(), wfGetDB(), and wfWaitForSlaves().

Referenced by run().

◆ trackRevisions()

TrackBlobs::trackRevisions ( )

Scan the revision table for rows stored in the specified clusters.

Definition at line 146 of file trackBlobs.php.

References $dbr, $res, $textClause, array(), as, DB_MASTER, DB_SLAVE, getTextClause(), interpretPointer(), wfGetDB(), and wfWaitForSlaves().

Referenced by run().

Member Data Documentation

◆ $batchSize

TrackBlobs::$batchSize = 1000

Definition at line 43 of file trackBlobs.php.

◆ $clusters

TrackBlobs::$clusters

Definition at line 39 of file trackBlobs.php.

Referenced by __construct().

◆ $doBlobOrphans

TrackBlobs::$doBlobOrphans

Definition at line 40 of file trackBlobs.php.

◆ $reportingInterval

TrackBlobs::$reportingInterval = 10

Definition at line 44 of file trackBlobs.php.

◆ $textClause

TrackBlobs::$textClause

Definition at line 39 of file trackBlobs.php.

Referenced by getTextClause(), trackOrphanText(), and trackRevisions().

◆ $trackedBlobs

TrackBlobs::$trackedBlobs = array()

Definition at line 41 of file trackBlobs.php.


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