MediaWiki REL1_37
TrackBlobs Class Reference

Public Member Functions

 __construct ( $clusters)
 
 run ()
 

Public Attributes

 $batchSize = 1000
 
 $clusters
 
 $doBlobOrphans
 
 $reportingInterval = 10
 
 $textClause
 
 $trackedBlobs = []
 

Private Member Functions

 checkIntegrity ()
 
 findOrphanBlobs ()
 Scan the blobs table for rows not registered in blob_tracking (and thus not registered in the text table).
 
 getTextClause ()
 
 initTrackingTable ()
 
 interpretPointer ( $text)
 
 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.
 
 trackRevisions ()
 Scan the revision table for rows stored in the specified clusters.
 

Detailed Description

Definition at line 41 of file trackBlobs.php.

Constructor & Destructor Documentation

◆ __construct()

TrackBlobs::__construct (   $clusters)

Definition at line 49 of file trackBlobs.php.

References $clusters.

Member Function Documentation

◆ checkIntegrity()

TrackBlobs::checkIntegrity ( )
private

Definition at line 71 of file trackBlobs.php.

References $dbr, DB_REPLICA, and wfGetDB().

Referenced by run().

◆ findOrphanBlobs()

TrackBlobs::findOrphanBlobs ( )
private

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 306 of file trackBlobs.php.

References $batchSize, $res, DB_PRIMARY, DB_REPLICA, and wfGetDB().

Referenced by run().

◆ getTextClause()

TrackBlobs::getTextClause ( )
private

Definition at line 102 of file trackBlobs.php.

References $dbr, $textClause, DB_REPLICA, and wfGetDB().

Referenced by trackOrphanText(), and trackRevisions().

◆ initTrackingTable()

TrackBlobs::initTrackingTable ( )
private

Definition at line 93 of file trackBlobs.php.

References DB_PRIMARY, and wfGetDB().

Referenced by run().

◆ interpretPointer()

TrackBlobs::interpretPointer (   $text)
private

Definition at line 117 of file trackBlobs.php.

Referenced by trackOrphanText(), and trackRevisions().

◆ run()

TrackBlobs::run ( )

◆ trackOrphanText()

TrackBlobs::trackOrphanText ( )
private

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, DB_PRIMARY, DB_REPLICA, getTextClause(), interpretPointer(), and wfGetDB().

Referenced by run().

◆ trackRevisions()

TrackBlobs::trackRevisions ( )
private

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

Definition at line 132 of file trackBlobs.php.

References $batchSize, $dbr, $res, $textClause, DB_PRIMARY, DB_REPLICA, getTextClause(), interpretPointer(), and wfGetDB().

Referenced by run().

Member Data Documentation

◆ $batchSize

TrackBlobs::$batchSize = 1000

Definition at line 46 of file trackBlobs.php.

Referenced by findOrphanBlobs(), and trackRevisions().

◆ $clusters

TrackBlobs::$clusters

Definition at line 42 of file trackBlobs.php.

Referenced by __construct().

◆ $doBlobOrphans

TrackBlobs::$doBlobOrphans

Definition at line 43 of file trackBlobs.php.

◆ $reportingInterval

TrackBlobs::$reportingInterval = 10

Definition at line 47 of file trackBlobs.php.

◆ $textClause

TrackBlobs::$textClause

Definition at line 42 of file trackBlobs.php.

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

◆ $trackedBlobs

TrackBlobs::$trackedBlobs = []

Definition at line 44 of file trackBlobs.php.


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