[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Moves blobs indexed by trackBlobs.php to a specified list of destination clusters, and recompresses them in the process. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 844 lines (22 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 1 file maintenance/commandLine.inc |
RecompressTracked:: (26 methods):
getOptionsWithArgs()
newFromCommandLine()
__construct()
debug()
info()
critical()
logToFile()
syncDBs()
execute()
executeParent()
checkTrackingTable()
startSlaveProcs()
killSlaveProcs()
dispatch()
dispatchToSlave()
doAllPages()
report()
doAllOrphans()
executeChild()
doPage()
moveTextRow()
finishIncompleteMoves()
getTargetCluster()
getExtDB()
doOrphanList()
waitForSlaves()
CgzCopyTransaction:: (5 methods):
__construct()
addItem()
getSize()
recompress()
commit()
Class: RecompressTracked - X-Ref
Maintenance script that moves blobs indexed by trackBlobs.php to a specifiedgetOptionsWithArgs() X-Ref |
No description |
newFromCommandLine( $args, $options ) X-Ref |
No description |
__construct( $options ) X-Ref |
No description |
debug( $msg ) X-Ref |
No description |
info( $msg ) X-Ref |
No description |
critical( $msg ) X-Ref |
No description |
logToFile( $msg, $file ) X-Ref |
No description |
syncDBs() X-Ref |
Wait until the selected slave has caught up to the master. This allows us to use the slave for things that were committed in a previous part of this batch process. |
execute() X-Ref |
Execute parent or child depending on the isChild option |
executeParent() X-Ref |
Execute the parent process |
checkTrackingTable() X-Ref |
Make sure the tracking table exists and isn't empty return: bool |
startSlaveProcs() X-Ref |
Start the worker processes. These processes will listen on stdin for commands. This necessary because text recompression is slow: loading, compressing and writing are all slow. |
killSlaveProcs() X-Ref |
Gracefully terminate the child processes |
dispatch( ) X-Ref |
Dispatch a command to the next available slave. This may block until a slave finishes its work and becomes available. |
dispatchToSlave( $slaveId, $args ) X-Ref |
Dispatch a command to a specified slave param: int $slaveId param: array|string $args |
doAllPages() X-Ref |
Move all tracked pages to the new clusters |
report( $label, $current, $end ) X-Ref |
Display a progress report param: string $label param: int $current param: int $end |
doAllOrphans() X-Ref |
Move all orphan text to the new clusters |
executeChild() X-Ref |
Main entry point for worker processes |
doPage( $pageId ) X-Ref |
Move tracked text in a given page param: int $pageId |
moveTextRow( $textId, $url ) X-Ref |
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. param: int $textId param: string $url |
finishIncompleteMoves( $conds ) X-Ref |
Moves are done in two phases: bt_new_url and then bt_moved. - bt_new_url indicates that the text has been copied to the new cluster. - bt_moved indicates that the text table has been updated. This function completes any moves that only have done bt_new_url. This can happen when the script is interrupted, or when --copy-only is used. param: array $conds |
getTargetCluster() X-Ref |
Returns the name of the next target cluster return: string |
getExtDB( $cluster ) X-Ref |
Gets a DB master connection for the given external cluster name param: string $cluster return: DatabaseBase |
doOrphanList( $textIds ) X-Ref |
Move an orphan text_id to the new cluster param: array $textIds |
waitForSlaves() X-Ref |
Wait for slaves (quietly) |
Class: CgzCopyTransaction - X-Ref
Class to represent a recompression operation for a single CGZ blob__construct( $parent, $blobClass ) X-Ref |
Create a transaction from a RecompressTracked object param: RecompressTracked $parent param: string $blobClass |
addItem( $text, $textId ) X-Ref |
Add text. Returns false if it's ready to commit. param: string $text param: int $textId return: bool |
getSize() X-Ref |
No description |
recompress() X-Ref |
Recompress text after some aberrant modification |
commit() X-Ref |
Commit the blob. Does nothing if no text items have been added. May skip the move if --copy-only is set. |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |