r97505 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97504‎ | r97505 | r97506 >
Date:15:31, 19 September 2011
Author:reedy
Status:ok
Tags:
Comment:
1.18wmf1 Merge r83867, r93686, r93807, r93971, r93972 (some manually do to location changes)
Modified paths:
  • /branches/wmf/1.18wmf1/includes/DefaultSettings.php (modified) (history)
  • /branches/wmf/1.18wmf1/includes/cache/HTMLCacheUpdate.php (modified) (history)
  • /branches/wmf/1.18wmf1/includes/cache/SquidUpdate.php (modified) (history)
  • /branches/wmf/1.18wmf1/includes/db/DatabaseMysql.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/includes/db/DatabaseMysql.php
@@ -110,6 +110,7 @@
111111 }
112112
113113 if ( $success ) {
 114+ /*
114115 $version = $this->getServerVersion();
115116 if ( version_compare( $version, '4.1' ) >= 0 ) {
116117 // Tell the server we're communicating with it in UTF-8.
@@ -127,6 +128,7 @@
128129 $this->query( "SET sql_mode = $mode", __METHOD__ );
129130 }
130131 }
 132+ */
131133
132134 // Turn off strict mode if it is on
133135 } else {
Index: branches/wmf/1.18wmf1/includes/cache/HTMLCacheUpdate.php
@@ -182,6 +182,10 @@
183183 array( 'page_id IN (' . $dbw->makeList( $batch ) . ')' ),
184184 __METHOD__
185185 );
 186+ # WM patch: throttle to avoid apache CPU exhaustion -- TS
 187+ if ( php_sapi_name() == 'cli' ) {
 188+ sleep( 1 );
 189+ }
186190 }
187191
188192 # Update squid
Index: branches/wmf/1.18wmf1/includes/cache/SquidUpdate.php
@@ -174,10 +174,24 @@
175175 }
176176 $url = SquidUpdate::expand( $url );
177177
 178+ // Try and incremement value in APC cache
 179+ $id = apc_inc( 'squidhtcppurge' );
 180+ if ( $id === false ) {
 181+ // If false, means it didn't work
 182+ // Chances are that means it isn't in the cache
 183+ // Start saving a cached value
 184+ $add = apc_add( 'squidhtcppurge', 1 );
 185+ if ( $add === false ) {
 186+ wfDebugLog( 'htcp', 'Unable to set value to APC cache' );
 187+ $id = 0;
 188+ } else {
 189+ $id = $add;
 190+ }
 191+ }
178192 // Construct a minimal HTCP request diagram
179193 // as per RFC 2756
180194 // Opcode 'CLR', no response desired, no auth
181 - $htcpTransID = rand();
 195+ $htcpTransID = $id;
182196
183197 $htcpSpecifier = pack( 'na4na*na8n',
184198 4, 'HEAD', strlen( $url ), $url,
Index: branches/wmf/1.18wmf1/includes/DefaultSettings.php
@@ -158,7 +158,8 @@
159159 * The URL path of the skins directory. Defaults to "{$wgScriptPath}/skins"
160160 */
161161 $wgStylePath = false;
162 -$wgStyleSheetPath = &$wgStylePath;
 162+# Broken PHP, canary mismatch -- TS
 163+#$wgStyleSheetPath = &$wgStylePath;
163164
164165 /**
165166 * The URL path of the skins directory. Should not point to an external domain.
@@ -3563,10 +3564,11 @@
35643565 * user who has provided an e-mail address.
35653566 */
35663567 $wgAutopromote = array(
 3568+ /* test patch -- TS
35673569 'autoconfirmed' => array( '&',
35683570 array( APCOND_EDITCOUNT, &$wgAutoConfirmCount ),
35693571 array( APCOND_AGE, &$wgAutoConfirmAge ),
3570 - ),
 3572+ ),*/
35713573 );
35723574
35733575 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r111194MFT r97505, r97508, r97509, r97512, r99928reedy19:53, 10 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83867Emergency patch: throttle job queue page_touched updateststarling02:50, 14 March 2011
r93686Merge live hacks - Tim's fixes for "canary mismatches" from back around the 1...demon23:34, 1 August 2011
r93807we don't need to change charsets on our systems, as we already have BINARY al...midom07:59, 3 August 2011
r93971Use APC caching to send incremental TCP requests, rather than using rand();reedy14:15, 5 August 2011
r93972Fix boolean fail from r93971reedy14:16, 5 August 2011

Status & tagging log