r56375 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56374‎ | r56375 | r56376 >
Date:17:46, 15 September 2009
Author:brion
Status:deferred
Tags:
Comment:
Merge some changes & custom scripts back from old wmf-deployment branch:
r53265
r53317
r53318
r53855
Modified paths:
  • /branches/wmf-deployment-work/StartProfiler.php (added) (history)
  • /branches/wmf-deployment-work/includes/DefaultSettings.php (modified) (history)
  • /branches/wmf-deployment-work/maintenance/jobs-loop.sh (added) (history)
  • /branches/wmf-deployment-work/maintenance/storage/make-all-blobs (added) (history)
  • /branches/wmf-deployment-work/maintenance/storage/recompressTracked.sh (added) (history)
  • /branches/wmf-deployment-work/maintenance/storage/testRctComplete.php (added) (history)
  • /branches/wmf-deployment-work/math/GNUmakefile (added) (history)

Diff [purge]

Index: branches/wmf-deployment-work/maintenance/storage/make-all-blobs
@@ -0,0 +1,18 @@
 2+#!/bin/bash
 3+
 4+if [ -z $1 ];then
 5+ echo "Usage: make-all-blobs <server> [<table name>]"
 6+ exit 1
 7+fi
 8+server=$1
 9+if [ -z $2 ]; then
 10+ table=blobs
 11+else
 12+ table=$2
 13+fi
 14+
 15+for db in `</home/wikipedia/common/all.dblist`;do
 16+ echo "CREATE DATABASE IF NOT EXISTS $db" | mysql -u wikiadmin -p`wikiadmin_pass` -h $server && \
 17+ sed "s/blobs\>/$table/" blobs.sql | mysql -u wikiadmin -p`wikiadmin_pass` -h $server $db
 18+done
 19+
Property changes on: branches/wmf-deployment-work/maintenance/storage/make-all-blobs
___________________________________________________________________
Name: svn:mergeinfo
120 + /branches/REL1_15/phase3/maintenance/storage/make-all-blobs:51646
/trunk/phase3/maintenance/storage/make-all-blobs:52290,52402,52404,52718,52737,52759,52776,52791,52800,52808,52812-52813,52815-52819,52822,52846,52850,52852-52853,52855-52857,52859,52924,52986,53128-53129,53190,53197,53199,53203-53204,53210-53211,53247,53249,53252,53267,53270,53293,53305,53344,53369,53427,53502-53504,53506,53777,54384,54494,54592,54599-54602,54604,54613,54764,54793,54806,55178,55626
Name: svn:executable
221 + *
Index: branches/wmf-deployment-work/maintenance/storage/recompressTracked.sh
@@ -0,0 +1,15 @@
 2+#!/bin/bash
 3+
 4+for db in `</home/wikipedia/common/all.dblist`;do
 5+ echo "
 6+-------------------------------------
 7+$db
 8+-------------------------------------
 9+" | tee -a /home/wikipedia/logs/norotate/rct/stdout.log
 10+ if [ "$db" == enwiki ]; then
 11+ procs=5
 12+ else
 13+ procs=5
 14+ fi
 15+ php recompressTracked.php --wiki=$db --procs=$procs --info-log=/home/wikipedia/logs/norotate/rct/info.log --critical-log=/home/wikipedia/logs/norotate/rct/critical.log rc1 2>&1 | tee -a /home/wikipedia/logs/norotate/rct/stdout.log
 16+done
Property changes on: branches/wmf-deployment-work/maintenance/storage/recompressTracked.sh
___________________________________________________________________
Name: svn:mergeinfo
117 + /branches/REL1_15/phase3/maintenance/storage/recompressTracked.sh:51646
/trunk/phase3/maintenance/storage/recompressTracked.sh:52290,52402,52404,52718,52737,52759,52776,52791,52800,52808,52812-52813,52815-52819,52822,52846,52850,52852-52853,52855-52857,52859,52924,52986,53128-53129,53190,53197,53199,53203-53204,53210-53211,53247,53249,53252,53267,53270,53293,53305,53344,53369,53427,53502-53504,53506,53777,54384,54494,54592,54599-54602,54604,54613,54764,54793,54806,55178,55626
Name: svn:eol-style
218 + native
Name: svn:executable
319 + *
Index: branches/wmf-deployment-work/maintenance/storage/testRctComplete.php
@@ -0,0 +1,22 @@
 2+<?php
 3+require_once( dirname(__FILE__).'/../commandLine.inc' );
 4+
 5+$bad = 0;
 6+$good = 0;
 7+foreach ( $wgLocalDatabases as $wiki ) {
 8+ $lb = wfGetLB( $wiki );
 9+ $db = $lb->getConnection( DB_SLAVE, array(), $wiki );
 10+ if ( $db->tableExists( 'blob_tracking' ) ) {
 11+ $notDone = $db->selectField( 'blob_tracking', '1',
 12+ array( 'bt_moved' => 0 ) );
 13+ if ( $notDone ) {
 14+ $bad++;
 15+ echo "$wiki\n";
 16+ } else {
 17+ $good++;
 18+ }
 19+ }
 20+ $lb->reuseConnection( $db );
 21+}
 22+echo "$bad wiki(s) incomplete\n";
 23+echo "$good wiki(s) complete\n";
Property changes on: branches/wmf-deployment-work/maintenance/storage/testRctComplete.php
___________________________________________________________________
Name: svn:mergeinfo
124 + /branches/REL1_15/phase3/maintenance/storage/testRctComplete.php:51646
/trunk/phase3/maintenance/storage/testRctComplete.php:52290,52402,52404,52718,52737,52759,52776,52791,52800,52808,52812-52813,52815-52819,52822,52846,52850,52852-52853,52855-52857,52859,52924,52986,53128-53129,53190,53197,53199,53203-53204,53210-53211,53247,53249,53252,53267,53270,53293,53305,53344,53369,53427,53502-53504,53506,53777,54384,54494,54592,54599-54602,54604,54613,54764,54793,54806,55178,55626
Name: svn:eol-style
225 + native
Index: branches/wmf-deployment-work/maintenance/jobs-loop.sh
@@ -0,0 +1,33 @@
 2+#!/bin/bash
 3+
 4+trap 'kill %-; exit' SIGTERM
 5+[ ! -z "$1" ] && {
 6+ echo "starting type-specific job runner: $1"
 7+ type=$1
 8+}
 9+
 10+cd `readlink -f /home/wikipedia/common/php/maintenance`
 11+while [ 1 ];do
 12+ db=
 13+ while [ -z $db ];do
 14+ if [ ! -z "$type" ]; then
 15+ db=`php -n nextJobDB.php --type=$type`
 16+ else
 17+ db=`php -n nextJobDB.php`
 18+ fi
 19+
 20+ if [ -z $db ];then
 21+ # No jobs to do, wait for a while
 22+ echo "No jobs..."
 23+ sleep 5
 24+ fi
 25+ done
 26+ echo $db
 27+ if [ ! -z "$type" ]; then
 28+ nice -n 20 php runJobs.php $db --procs=4 $type &
 29+ else
 30+ nice -n 20 php runJobs.php $db --procs=4 &
 31+ fi
 32+ wait
 33+done
 34+
Property changes on: branches/wmf-deployment-work/maintenance/jobs-loop.sh
___________________________________________________________________
Name: svn:mergeinfo
135 + /branches/REL1_15/phase3/maintenance/jobs-loop.sh:51646
/trunk/phase3/maintenance/jobs-loop.sh:52290,52402,52404,52718,52737,52759,52776,52791,52800,52808,52812-52813,52815-52819,52822,52846,52850,52852-52853,52855-52857,52859,52924,52986,53128-53129,53190,53197,53199,53203-53204,53210-53211,53247,53249,53252,53267,53270,53293,53305,53344,53369,53427,53502-53504,53506,53777,54384,54494,54592,54599-54602,54604,54613,54764,54793,54806,55178,55626
Name: svn:eol-style
236 + native
Name: svn:executable
337 + *
Index: branches/wmf-deployment-work/math/GNUmakefile
@@ -0,0 +1,2 @@
 2+all:
 3+ @echo "Do not run make on the NFS copy, use scap to rebuild it everywhere"
Property changes on: branches/wmf-deployment-work/math/GNUmakefile
___________________________________________________________________
Name: svn:mergeinfo
14 + /branches/REL1_15/phase3/math/GNUmakefile:51646
/trunk/phase3/math/GNUmakefile:52290,52402,52404,52718,52737,52759,52776,52791,52800,52808,52812-52813,52815-52819,52822,52846,52850,52852-52853,52855-52857,52859,52924,52986,53128-53129,53190,53197,53199,53203-53204,53210-53211,53247,53249,53252,53267,53270,53293,53305,53344,53369,53427,53502-53504,53506,53777,54384,54494,54592,54599-54602,54604,54613,54764,54793,54806,55178,55626
Index: branches/wmf-deployment-work/includes/DefaultSettings.php
@@ -33,7 +33,7 @@
3434 }
3535
3636 /** MediaWiki version number */
37 -$wgVersion = '1.16alpha';
 37+$wgVersion = '1.16alpha-wmf';
3838
3939 /** Name of the site. It must be changed in LocalSettings.php */
4040 $wgSitename = 'MediaWiki';
Index: branches/wmf-deployment-work/StartProfiler.php
@@ -0,0 +1,51 @@
 2+<?php
 3+# WARNING: This file is publically viewable on the web. Do not put private data here.
 4+#
 5+$rand = mt_rand(0, 0x7fffffff);
 6+$host = @$_SERVER['HTTP_HOST'];
 7+
 8+/*if ( ( !($rand % 50) && $host == 'en.wikipedia.org' ) ||
 9+ ( !($rand % 50) && $host == 'commons.wikimedia.org') ||
 10+ ( !($rand % 50) && $host == 'de.wikipedia.org') ||
 11+ ( !($rand % 50) && $host == 'es.wikipedia.org') ||
 12+ ( !($rand % 1) && $host == 'test.wikipedia.org' ) ||
 13+ ( $host == 'zh.wikipedia.org' ) ||
 14+ ( !($rand % 10) && $host == 'ja.wikipedia.org' )
 15+) {*/
 16+if ( @$_SERVER['REQUEST_URI'] == '/w/index.php?title=United_States&action=submit' ) {
 17+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' );
 18+ $wgProfiler = new ProfilerSimpleUDP;
 19+ $wgProfiler->setProfileID( 'bigpage' );
 20+} elseif (@defined($_REQUEST['forceprofile'])) {
 21+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleText.php' );
 22+ $wgProfiler = new ProfilerSimpleText;
 23+ $wgProfiler->setProfileID( 'forced' );
 24+} elseif (@defined($_REQUEST['forcetrace'])) {
 25+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleTrace.php' );
 26+ $wgProfiler = new ProfilerSimpleTrace;
 27+} elseif ( strpos( @$_SERVER['REQUEST_URI'], '/w/thumb.php' ) !== false ) {
 28+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' );
 29+ $wgProfiler = new ProfilerSimpleUDP;
 30+ $wgProfiler->setProfileID( 'thumb' );
 31+} elseif ( !( $rand % 50 ) ) {
 32+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' );
 33+ $wgProfiler = new ProfilerSimpleUDP;
 34+ if ( $host == 'en.wikipedia.org' ) {
 35+ $wgProfiler->setProfileID( 'enwiki' );
 36+ } elseif ( $host == 'de.wikipedia.org' ) {
 37+ $wgProfiler->setProfileID( 'dewiki' );
 38+ } else {
 39+ $wgProfiler->setProfileID( 'others' );
 40+ }
 41+ #$wgProfiler->setProfileID( 'all' );
 42+ #$wgProfiler->setMinimum(5 /* seconds */);
 43+}
 44+elseif ( defined( 'MW_FORCE_PROFILE' ) ) {
 45+ require_once( dirname(__FILE__).'/includes/Profiler.php' );
 46+ $wgProfiler = new Profiler;
 47+} else {
 48+ require_once( dirname(__FILE__).'/includes/ProfilerStub.php' );
 49+}
 50+
 51+
 52+
Property changes on: branches/wmf-deployment-work/StartProfiler.php
___________________________________________________________________
Name: svn:mergeinfo
153 + /branches/REL1_15/phase3/StartProfiler.php:51646
/trunk/phase3/StartProfiler.php:52290,52402,52404,52718,52737,52759,52776,52791,52800,52808,52812-52813,52815-52819,52822,52846,52850,52852-52853,52855-52857,52859,52924,52986,53128-53129,53190,53197,53199,53203-53204,53210-53211,53247,53249,53252,53267,53270,53293,53305,53344,53369,53427,53502-53504,53506,53777,54384,54494,54592,54599-54602,54604,54613,54764,54793,54806,55178,55626
Name: svn:eol-style
254 + native

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r53265Adding "-wmf" suffix on $wgVersionbrion20:47, 14 July 2009
r53317Add live hack: override makefile to avoid our accidentally running wrong make...brion17:39, 15 July 2009
r53318Commit some maintenance scripts from live site per Tim's recommendationbrion17:44, 15 July 2009
r53855Commit mysterious live hacks, apparently courtesy of Domas?brion03:41, 28 July 2009

Status & tagging log