MediaWiki REL1_38
recompressTracked.php
Go to the documentation of this file.
1<?php
29use Wikimedia\AtEase\AtEase;
30
32require __DIR__ . '/../CommandLineInc.php';
33
34if ( count( $args ) < 1 ) {
35 echo "Usage: php recompressTracked.php [options] <cluster> [... <cluster>...]
36Moves blobs indexed by trackBlobs.php to a specified list of destination clusters,
37and recompresses them in the process. Restartable.
38
39Options:
40 --procs <procs> Set the number of child processes (default 1)
41 --copy-only Copy only, do not update the text table. Restart
42 without this option to complete.
43 --debug-log <file> Log debugging data to the specified file
44 --info-log <file> Log progress messages to the specified file
45 --critical-log <file> Log error messages to the specified file
46";
47 exit( 1 );
48}
49
51$job->execute();
52
61 public $batchSize = 1000;
62 public $orphanBatchSize = 1000;
63 public $reportingInterval = 10;
64 public $numProcs = 1;
65 public $numBatches = 0;
68 public $copyOnly = false;
69 public $isChild = false;
70 public $childId = false;
71 public $noCount = false;
74 public $store;
76 private $blobStore;
77
78 private static $optionsWithArgs = [
79 'procs',
80 'child-id',
81 'debug-log',
82 'info-log',
83 'critical-log'
84 ];
85
86 private static $cmdLineOptionMap = [
87 'no-count' => 'noCount',
88 'procs' => 'numProcs',
89 'copy-only' => 'copyOnly',
90 'child' => 'isChild',
91 'child-id' => 'childId',
92 'debug-log' => 'debugLog',
93 'info-log' => 'infoLog',
94 'critical-log' => 'criticalLog',
95 ];
96
97 public static function getOptionsWithArgs() {
99 }
100
101 public static function newFromCommandLine( $args, $options ) {
102 $jobOptions = [ 'destClusters' => $args ];
103 foreach ( self::$cmdLineOptionMap as $cmdOption => $classOption ) {
104 if ( isset( $options[$cmdOption] ) ) {
105 $jobOptions[$classOption] = $options[$cmdOption];
106 }
107 }
108
109 return new self( $jobOptions );
110 }
111
112 public function __construct( $options ) {
113 foreach ( $options as $name => $value ) {
114 $this->$name = $value;
115 }
116 $esFactory = MediaWikiServices::getInstance()->getExternalStoreFactory();
117 $this->store = $esFactory->getStore( 'DB' );
118 if ( !$this->isChild ) {
119 $GLOBALS['wgDebugLogPrefix'] = "RCT M: ";
120 } elseif ( $this->childId !== false ) {
121 $GLOBALS['wgDebugLogPrefix'] = "RCT {$this->childId}: ";
122 }
123 $this->pageBlobClass = function_exists( 'xdiff_string_bdiff' ) ?
124 DiffHistoryBlob::class : ConcatenatedGzipHistoryBlob::class;
125 $this->orphanBlobClass = ConcatenatedGzipHistoryBlob::class;
126
127 $this->blobStore = MediaWikiServices::getInstance()
128 ->getBlobStoreFactory()
129 ->newSqlBlobStore();
130 }
131
132 public function debug( $msg ) {
133 wfDebug( "$msg" );
134 if ( $this->debugLog ) {
135 $this->logToFile( $msg, $this->debugLog );
136 }
137 }
138
139 public function info( $msg ) {
140 echo "$msg\n";
141 if ( $this->infoLog ) {
142 $this->logToFile( $msg, $this->infoLog );
143 }
144 }
145
146 public function critical( $msg ) {
147 echo "$msg\n";
148 if ( $this->criticalLog ) {
149 $this->logToFile( $msg, $this->criticalLog );
150 }
151 }
152
153 private function logToFile( $msg, $file ) {
154 $header = '[' . date( 'd\TH:i:s' ) . '] ' . wfHostname() . ' ' . posix_getpid();
155 if ( $this->childId !== false ) {
156 $header .= "({$this->childId})";
157 }
158 $header .= ' ' . WikiMap::getCurrentWikiDbDomain()->getId();
159 LegacyLogger::emit( sprintf( "%-50s %s\n", $header, $msg ), $file );
160 }
161
167 private function syncDBs() {
168 $dbw = wfGetDB( DB_PRIMARY );
170 $pos = $dbw->getPrimaryPos();
171 $dbr->primaryPosWait( $pos, 100000 );
172 }
173
177 public function execute() {
178 if ( $this->isChild ) {
179 $this->executeChild();
180 } else {
181 $this->executeParent();
182 }
183 }
184
188 public function executeParent() {
189 if ( !$this->checkTrackingTable() ) {
190 return;
191 }
192
193 $this->syncDBs();
194 $this->startChildProcs();
195 $this->doAllPages();
196 $this->doAllOrphans();
197 $this->killChildProcs();
198 }
199
204 private function checkTrackingTable() {
206 if ( !$dbr->tableExists( 'blob_tracking', __METHOD__ ) ) {
207 $this->critical( "Error: blob_tracking table does not exist" );
208
209 return false;
210 }
211 $row = $dbr->selectRow( 'blob_tracking', '*', '', __METHOD__ );
212 if ( !$row ) {
213 $this->info( "Warning: blob_tracking table contains no rows, skipping this wiki." );
214
215 return false;
216 }
217
218 return true;
219 }
220
227 private function startChildProcs() {
228 $wiki = WikiMap::getCurrentWikiId();
229
230 $cmd = 'php ' . Shell::escape( __FILE__ );
231 foreach ( self::$cmdLineOptionMap as $cmdOption => $classOption ) {
232 if ( $cmdOption == 'child-id' ) {
233 continue;
234 }
235 if ( in_array( $cmdOption, self::$optionsWithArgs ) && isset( $this->$classOption ) ) {
236 $cmd .= " --$cmdOption " . Shell::escape( $this->$classOption );
237 } elseif ( $this->$classOption ) {
238 $cmd .= " --$cmdOption";
239 }
240 }
241 $cmd .= ' --child' .
242 ' --wiki ' . Shell::escape( $wiki ) .
243 ' ' . Shell::escape( ...$this->destClusters );
244
245 $this->childPipes = $this->childProcs = [];
246 for ( $i = 0; $i < $this->numProcs; $i++ ) {
247 $pipes = [];
248 $spec = [
249 [ 'pipe', 'r' ],
250 [ 'file', 'php://stdout', 'w' ],
251 [ 'file', 'php://stderr', 'w' ]
252 ];
253 AtEase::suppressWarnings();
254 $proc = proc_open( "$cmd --child-id $i", $spec, $pipes );
255 AtEase::restoreWarnings();
256 if ( !$proc ) {
257 $this->critical( "Error opening child process: $cmd" );
258 exit( 1 );
259 }
260 $this->childProcs[$i] = $proc;
261 $this->childPipes[$i] = $pipes[0];
262 }
263 $this->prevChildId = -1;
264 }
265
269 private function killChildProcs() {
270 $this->info( "Waiting for child processes to finish..." );
271 for ( $i = 0; $i < $this->numProcs; $i++ ) {
272 $this->dispatchToChild( $i, 'quit' );
273 }
274 for ( $i = 0; $i < $this->numProcs; $i++ ) {
275 $status = proc_close( $this->childProcs[$i] );
276 if ( $status ) {
277 $this->critical( "Warning: child #$i exited with status $status" );
278 }
279 }
280 $this->info( "Done." );
281 }
282
288 private function dispatch( ...$args ) {
289 $pipes = $this->childPipes;
290 $x = [];
291 $y = [];
292 $numPipes = stream_select( $x, $pipes, $y, 3600 );
293 if ( !$numPipes ) {
294 $this->critical( "Error waiting to write to child process. Aborting" );
295 exit( 1 );
296 }
297 for ( $i = 0; $i < $this->numProcs; $i++ ) {
298 $childId = ( $i + $this->prevChildId + 1 ) % $this->numProcs;
299 if ( isset( $pipes[$childId] ) ) {
300 $this->prevChildId = $childId;
301 $this->dispatchToChild( $childId, $args );
302
303 return;
304 }
305 }
306 $this->critical( "Unreachable" );
307 exit( 1 );
308 }
309
315 private function dispatchToChild( $childId, $args ) {
316 $args = (array)$args;
317 $cmd = implode( ' ', $args );
318 fwrite( $this->childPipes[$childId], "$cmd\n" );
319 }
320
324 private function doAllPages() {
326 $i = 0;
327 $startId = 0;
328 if ( $this->noCount ) {
329 $numPages = '[unknown]';
330 } else {
331 $numPages = $dbr->selectField( 'blob_tracking',
332 'COUNT(DISTINCT bt_page)',
333 # A condition is required so that this query uses the index
334 [ 'bt_moved' => 0 ],
335 __METHOD__
336 );
337 }
338 if ( $this->copyOnly ) {
339 $this->info( "Copying pages..." );
340 } else {
341 $this->info( "Moving pages..." );
342 }
343 while ( true ) {
344 $res = $dbr->select( 'blob_tracking',
345 [ 'bt_page' ],
346 [
347 'bt_moved' => 0,
348 'bt_page > ' . $dbr->addQuotes( $startId )
349 ],
350 __METHOD__,
351 [
352 'DISTINCT',
353 'ORDER BY' => 'bt_page',
354 'LIMIT' => $this->batchSize,
355 ]
356 );
357 if ( !$res->numRows() ) {
358 break;
359 }
360 foreach ( $res as $row ) {
361 $startId = $row->bt_page;
362 $this->dispatch( 'doPage', $row->bt_page );
363 $i++;
364 }
365 $this->report( 'pages', $i, $numPages );
366 }
367 $this->report( 'pages', $i, $numPages );
368 if ( $this->copyOnly ) {
369 $this->info( "All page copies queued." );
370 } else {
371 $this->info( "All page moves queued." );
372 }
373 }
374
381 private function report( $label, $current, $end ) {
382 $this->numBatches++;
383 if ( $current == $end || $this->numBatches >= $this->reportingInterval ) {
384 $this->numBatches = 0;
385 $this->info( "$label: $current / $end" );
386 MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->waitForReplication();
387 }
388 }
389
393 private function doAllOrphans() {
395 $startId = 0;
396 $i = 0;
397 if ( $this->noCount ) {
398 $numOrphans = '[unknown]';
399 } else {
400 $numOrphans = $dbr->selectField( 'blob_tracking',
401 'COUNT(DISTINCT bt_text_id)',
402 [ 'bt_moved' => 0, 'bt_page' => 0 ],
403 __METHOD__ );
404 if ( !$numOrphans ) {
405 return;
406 }
407 }
408 if ( $this->copyOnly ) {
409 $this->info( "Copying orphans..." );
410 } else {
411 $this->info( "Moving orphans..." );
412 }
413
414 while ( true ) {
415 $res = $dbr->select( 'blob_tracking',
416 [ 'bt_text_id' ],
417 [
418 'bt_moved' => 0,
419 'bt_page' => 0,
420 'bt_text_id > ' . $dbr->addQuotes( $startId )
421 ],
422 __METHOD__,
423 [
424 'DISTINCT',
425 'ORDER BY' => 'bt_text_id',
426 'LIMIT' => $this->batchSize
427 ]
428 );
429 if ( !$res->numRows() ) {
430 break;
431 }
432 $ids = [];
433 foreach ( $res as $row ) {
434 $startId = $row->bt_text_id;
435 $ids[] = $row->bt_text_id;
436 $i++;
437 }
438 // Need to send enough orphan IDs to the child at a time to fill a blob,
439 // so orphanBatchSize needs to be at least ~100.
440 // batchSize can be smaller or larger.
441 while ( count( $ids ) > $this->orphanBatchSize ) {
442 $args = array_slice( $ids, 0, $this->orphanBatchSize );
443 $ids = array_slice( $ids, $this->orphanBatchSize );
444 array_unshift( $args, 'doOrphanList' );
445 $this->dispatch( ...$args );
446 }
447 if ( count( $ids ) ) {
448 $args = $ids;
449 array_unshift( $args, 'doOrphanList' );
450 $this->dispatch( ...$args );
451 }
452
453 $this->report( 'orphans', $i, $numOrphans );
454 }
455 $this->report( 'orphans', $i, $numOrphans );
456 $this->info( "All orphans queued." );
457 }
458
462 public function executeChild() {
463 $this->debug( 'starting' );
464 $this->syncDBs();
465
466 while ( !feof( STDIN ) ) {
467 $line = rtrim( fgets( STDIN ) );
468 if ( $line == '' ) {
469 continue;
470 }
471 $this->debug( $line );
472 $args = explode( ' ', $line );
473 $cmd = array_shift( $args );
474 switch ( $cmd ) {
475 case 'doPage':
476 $this->doPage( intval( $args[0] ) );
477 break;
478 case 'doOrphanList':
479 $this->doOrphanList( array_map( 'intval', $args ) );
480 break;
481 case 'quit':
482 return;
483 }
484 MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->waitForReplication();
485 }
486 }
487
493 private function doPage( $pageId ) {
494 $title = Title::newFromID( $pageId );
495 if ( $title ) {
496 $titleText = $title->getPrefixedText();
497 } else {
498 $titleText = '[deleted]';
499 }
501
502 // Finish any incomplete transactions
503 if ( !$this->copyOnly ) {
504 $this->finishIncompleteMoves( [ 'bt_page' => $pageId ] );
505 $this->syncDBs();
506 }
507
508 $startId = 0;
509 $trx = new CgzCopyTransaction( $this, $this->pageBlobClass );
510
511 $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
512 while ( true ) {
513 $res = $dbr->select(
514 [ 'blob_tracking', 'text' ],
515 '*',
516 [
517 'bt_page' => $pageId,
518 'bt_text_id > ' . $dbr->addQuotes( $startId ),
519 'bt_moved' => 0,
520 'bt_new_url IS NULL',
521 'bt_text_id=old_id',
522 ],
523 __METHOD__,
524 [
525 'ORDER BY' => 'bt_text_id',
526 'LIMIT' => $this->batchSize
527 ]
528 );
529 if ( !$res->numRows() ) {
530 break;
531 }
532
533 $lastTextId = 0;
534 foreach ( $res as $row ) {
535 $startId = $row->bt_text_id;
536 if ( $lastTextId == $row->bt_text_id ) {
537 // Duplicate (null edit)
538 continue;
539 }
540 $lastTextId = $row->bt_text_id;
541 // Load the text
542 $text = $this->blobStore->expandBlob( $row->old_text, $row->old_flags );
543 if ( $text === false ) {
544 $this->critical( "Error loading {$row->bt_rev_id}/{$row->bt_text_id}" );
545 continue;
546 }
547
548 // Queue it
549 if ( !$trx->addItem( $text, $row->bt_text_id ) ) {
550 $this->debug( "$titleText: committing blob with " . $trx->getSize() . " items" );
551 $trx->commit();
552 $trx = new CgzCopyTransaction( $this, $this->pageBlobClass );
553 $lbFactory->waitForReplication();
554 }
555 }
556 }
557
558 $this->debug( "$titleText: committing blob with " . $trx->getSize() . " items" );
559 $trx->commit();
560 }
561
575 public function moveTextRow( $textId, $url ) {
576 if ( $this->copyOnly ) {
577 $this->critical( "Internal error: can't call moveTextRow() in --copy-only mode" );
578 exit( 1 );
579 }
580 $dbw = wfGetDB( DB_PRIMARY );
581 $dbw->begin( __METHOD__ );
582 $dbw->update( 'text',
583 [ // set
584 'old_text' => $url,
585 'old_flags' => 'external,utf-8',
586 ],
587 [ // where
588 'old_id' => $textId
589 ],
590 __METHOD__
591 );
592 $dbw->update( 'blob_tracking',
593 [ 'bt_moved' => 1 ],
594 [ 'bt_text_id' => $textId ],
595 __METHOD__
596 );
597 $dbw->commit( __METHOD__ );
598 }
599
610 private function finishIncompleteMoves( $conds ) {
612 $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
613
614 $startId = 0;
615 $conds = array_merge( $conds, [
616 'bt_moved' => 0,
617 'bt_new_url IS NOT NULL'
618 ] );
619 while ( true ) {
620 $res = $dbr->select( 'blob_tracking',
621 '*',
622 array_merge( $conds, [ 'bt_text_id > ' . $dbr->addQuotes( $startId ) ] ),
623 __METHOD__,
624 [
625 'ORDER BY' => 'bt_text_id',
626 'LIMIT' => $this->batchSize,
627 ]
628 );
629 if ( !$res->numRows() ) {
630 break;
631 }
632 $this->debug( 'Incomplete: ' . $res->numRows() . ' rows' );
633 foreach ( $res as $row ) {
634 $startId = $row->bt_text_id;
635 $this->moveTextRow( $row->bt_text_id, $row->bt_new_url );
636 if ( $row->bt_text_id % 10 == 0 ) {
637 $lbFactory->waitForReplication();
638 }
639 }
640 }
641 }
642
647 public function getTargetCluster() {
648 $cluster = next( $this->destClusters );
649 if ( $cluster === false ) {
650 $cluster = reset( $this->destClusters );
651 }
652
653 return $cluster;
654 }
655
661 private function doOrphanList( $textIds ) {
662 // Finish incomplete moves
663 if ( !$this->copyOnly ) {
664 $this->finishIncompleteMoves( [ 'bt_text_id' => $textIds ] );
665 $this->syncDBs();
666 }
667
668 $trx = new CgzCopyTransaction( $this, $this->orphanBlobClass );
669
670 $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
671 $res = wfGetDB( DB_REPLICA )->select(
672 [ 'text', 'blob_tracking' ],
673 [ 'old_id', 'old_text', 'old_flags' ],
674 [
675 'old_id' => $textIds,
676 'bt_text_id=old_id',
677 'bt_moved' => 0,
678 ],
679 __METHOD__,
680 [ 'DISTINCT' ]
681 );
682
683 foreach ( $res as $row ) {
684 $text = $this->blobStore->expandBlob( $row->old_text, $row->old_flags );
685 if ( $text === false ) {
686 $this->critical( "Error: cannot load revision text for old_id={$row->old_id}" );
687 continue;
688 }
689
690 if ( !$trx->addItem( $text, $row->old_id ) ) {
691 $this->debug( "[orphan]: committing blob with " . $trx->getSize() . " rows" );
692 $trx->commit();
693 $trx = new CgzCopyTransaction( $this, $this->orphanBlobClass );
694 $lbFactory->waitForReplication();
695 }
696 }
697 $this->debug( "[orphan]: committing blob with " . $trx->getSize() . " rows" );
698 $trx->commit();
699 }
700}
701
707 public $parent;
710 public $cgz;
713 private $texts;
714
720 public function __construct( $parent, $blobClass ) {
721 $this->blobClass = $blobClass;
722 $this->cgz = false;
723 $this->texts = [];
724 $this->parent = $parent;
725 }
726
734 public function addItem( $text, $textId ) {
735 if ( !$this->cgz ) {
736 $class = $this->blobClass;
737 $this->cgz = new $class;
738 }
739 $hash = $this->cgz->addItem( $text );
740 $this->referrers[$textId] = $hash;
741 $this->texts[$textId] = $text;
742
743 return $this->cgz->isHappy();
744 }
745
746 public function getSize() {
747 return count( $this->texts );
748 }
749
753 public function recompress() {
754 $class = $this->blobClass;
755 $this->cgz = new $class;
756 $this->referrers = [];
757 foreach ( $this->texts as $textId => $text ) {
758 $hash = $this->cgz->addItem( $text );
759 $this->referrers[$textId] = $hash;
760 }
761 }
762
768 public function commit() {
769 $originalCount = count( $this->texts );
770 if ( !$originalCount ) {
771 return;
772 }
773
774 /* Check to see if the target text_ids have been moved already.
775 *
776 * We originally read from the replica DB, so this can happen when a single
777 * text_id is shared between multiple pages. It's rare, but possible
778 * if a delete/move/undelete cycle splits up a null edit.
779 *
780 * We do a locking read to prevent closer-run race conditions.
781 */
782 $dbw = wfGetDB( DB_PRIMARY );
783 $dbw->begin( __METHOD__ );
784 $res = $dbw->select( 'blob_tracking',
785 [ 'bt_text_id', 'bt_moved' ],
786 [ 'bt_text_id' => array_keys( $this->referrers ) ],
787 __METHOD__, [ 'FOR UPDATE' ] );
788 $dirty = false;
789 foreach ( $res as $row ) {
790 if ( $row->bt_moved ) {
791 # This row has already been moved, remove it
792 $this->parent->debug( "TRX: conflict detected in old_id={$row->bt_text_id}" );
793 unset( $this->texts[$row->bt_text_id] );
794 $dirty = true;
795 }
796 }
797
798 // Recompress the blob if necessary
799 if ( $dirty ) {
800 if ( !count( $this->texts ) ) {
801 // All have been moved already
802 if ( $originalCount > 1 ) {
803 // This is suspcious, make noise
804 $this->parent->critical(
805 "Warning: concurrent operation detected, are there two conflicting " .
806 "processes running, doing the same job?" );
807 }
808
809 return;
810 }
811 $this->recompress();
812 }
813
814 // Insert the data into the destination cluster
815 $targetCluster = $this->parent->getTargetCluster();
816 $store = $this->parent->store;
817 $targetDB = $store->getPrimary( $targetCluster );
818 $targetDB->clearFlag( DBO_TRX ); // we manage the transactions
819 $targetDB->begin( __METHOD__ );
820 $baseUrl = $this->parent->store->store( $targetCluster, serialize( $this->cgz ) );
821
822 // Write the new URLs to the blob_tracking table
823 foreach ( $this->referrers as $textId => $hash ) {
824 $url = $baseUrl . '/' . $hash;
825 $dbw->update( 'blob_tracking',
826 [ 'bt_new_url' => $url ],
827 [
828 'bt_text_id' => $textId,
829 'bt_moved' => 0, # Check for concurrent conflicting update
830 ],
831 __METHOD__
832 );
833 }
834
835 $targetDB->commit( __METHOD__ );
836 // Critical section here: interruption at this point causes blob duplication
837 // Reversing the order of the commits would cause data loss instead
838 $dbw->commit( __METHOD__ );
839
840 // Write the new URLs to the text table and set the moved flag
841 if ( !$this->parent->copyOnly ) {
842 foreach ( $this->referrers as $textId => $hash ) {
843 $url = $baseUrl . '/' . $hash;
844 $this->parent->moveTextRow( $textId, $url );
845 }
846 }
847 }
848}
serialize()
wfDebug( $text, $dest='all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
wfHostname()
Get host name of the current machine, for use in error reporting.
Class to represent a recompression operation for a single CGZ blob.
RecompressTracked $parent
ConcatenatedGzipHistoryBlob false $cgz
addItem( $text, $textId)
Add text.
commit()
Commit the blob.
recompress()
Recompress text after some aberrant modification.
__construct( $parent, $blobClass)
Create a transaction from a RecompressTracked object.
Concatenated gzip (CGZ) storage Improves compression ratio by concatenating like objects before gzipp...
External storage in a SQL database.
PSR-3 logger that mimics the historic implementation of MediaWiki's former wfErrorLog logging impleme...
MediaWikiServices is the service locator for the application scope of MediaWiki.
Executes shell commands.
Definition Shell.php:45
Service for storing and loading Content objects.
Maintenance script that moves blobs indexed by trackBlobs.php to a specified list of destination clus...
executeChild()
Main entry point for worker processes.
moveTextRow( $textId, $url)
Atomic move operation.
killChildProcs()
Gracefully terminate the child processes.
report( $label, $current, $end)
Display a progress report.
execute()
Execute parent or child depending on the isChild option.
doOrphanList( $textIds)
Move an orphan text_id to the new cluster.
startChildProcs()
Start the worker processes.
doAllOrphans()
Move all orphan text to the new clusters.
static newFromCommandLine( $args, $options)
finishIncompleteMoves( $conds)
Moves are done in two phases: bt_new_url and then bt_moved.
dispatch(... $args)
Dispatch a command to the next available child process.
doPage( $pageId)
Move tracked text in a given page.
syncDBs()
Wait until the selected replica DB has caught up to the master.
dispatchToChild( $childId, $args)
Dispatch a command to a specified child process.
getTargetCluster()
Returns the name of the next target cluster.
executeParent()
Execute the parent process.
doAllPages()
Move all tracked pages to the new clusters.
ExternalStoreDB $store
checkTrackingTable()
Make sure the tracking table exists and isn't empty.
$line
Definition mcc.php:119
if( $line===false) $args
Definition mcc.php:124
const DB_REPLICA
Definition defines.php:25
const DB_PRIMARY
Definition defines.php:27
const DBO_TRX
Definition defines.php:12
$optionsWithArgs
if(count( $args)< 1) $job
if(PHP_SAPI !='cli-server') if(!isset( $_SERVER['SCRIPT_FILENAME'])) $file
Item class for a filearchive table row.
Definition router.php:42
$header