Reedy has uploaded a new change for review.
https://gerrit.wikimedia.org/r/52065
Change subject: Revert "Commit of various live hacks"
......................................................................
Revert "Commit of various live hacks"
This reverts commit 3d6851f66257d5df117688b51b7f3037c8ab6aaf.
Change-Id: I26c418d631047783ba945e6b6a7f707d876b3146
---
M includes/DefaultSettings.php
M includes/MessageBlobStore.php
M includes/cache/SquidUpdate.php
M includes/db/DatabaseMysql.php
M includes/job/jobs/HTMLCacheUpdateJob.php
M maintenance/tables.sql
6 files changed, 9 insertions(+), 32 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/65/52065/1
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index c67cea6..73c097e 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -183,8 +183,7 @@
* Defaults to "{$wgScriptPath}/skins".
*/
$wgStylePath = false;
-# Broken PHP, canary mismatch -- TS
-#$wgStyleSheetPath = &$wgStylePath;
+$wgStyleSheetPath = &$wgStylePath;
/**
* The URL path of the skins directory. Should not point to an external domain.
@@ -4167,11 +4166,10 @@
* user who has provided an e-mail address.
*/
$wgAutopromote = array(
- /* test patch -- TS
'autoconfirmed' => array( '&',
array( APCOND_EDITCOUNT, &$wgAutoConfirmCount ),
array( APCOND_AGE, &$wgAutoConfirmAge ),
- ), */
+ ),
);
/**
diff --git a/includes/MessageBlobStore.php b/includes/MessageBlobStore.php
index 6b8cf7e..6322be7 100644
--- a/includes/MessageBlobStore.php
+++ b/includes/MessageBlobStore.php
@@ -241,9 +241,6 @@
}
public static function clear() {
- // HACK: disable clear() on WMF servers
- return;
-
// TODO: Give this some more thought
// TODO: Is TRUNCATE better?
try {
diff --git a/includes/cache/SquidUpdate.php b/includes/cache/SquidUpdate.php
index 10589c2..784e30e 100644
--- a/includes/cache/SquidUpdate.php
+++ b/includes/cache/SquidUpdate.php
@@ -202,25 +202,10 @@
throw new MWException( "Invalid HTCP
rule for URL $url\n" );
}
- // Try and incremement value in APC cache
- $id = apc_inc( 'squidhtcppurge' );
- if ( $id === false ) {
- // If false, means it didn't work
- // Chances are that means it isn't in
the cache
- // Start saving a cached value
- $add = apc_add( 'squidhtcppurge', 1 );
- if ( $add === false ) {
- wfDebugLog( 'htcp', 'Unable to
set value to APC cache' );
- $id = 0;
- } else {
- $id = $add;
- }
- }
-
// Construct a minimal HTCP request diagram
// as per RFC 2756
// Opcode 'CLR', no response desired, no auth
- $htcpTransID = $id;
+ $htcpTransID = rand();
$htcpSpecifier = pack( 'na4na*na8n',
4, 'HEAD', strlen( $url ), $url,
diff --git a/includes/db/DatabaseMysql.php b/includes/db/DatabaseMysql.php
index 84828cb..fab0e96 100644
--- a/includes/db/DatabaseMysql.php
+++ b/includes/db/DatabaseMysql.php
@@ -152,11 +152,11 @@
// Tell the server we're communicating with it in UTF-8.
// This may engage various charset conversions.
- /*if( $wgDBmysql5 ) {
+ if( $wgDBmysql5 ) {
$this->query( 'SET NAMES utf8', __METHOD__ );
} else {
$this->query( 'SET NAMES binary', __METHOD__ );
- }*/
+ }
// Set SQL mode, default is turning them all off, can be
overridden or skipped with null
if ( is_string( $wgSQLMode ) ) {
$mode = $this->addQuotes( $wgSQLMode );
diff --git a/includes/job/jobs/HTMLCacheUpdateJob.php
b/includes/job/jobs/HTMLCacheUpdateJob.php
index da17d79..20245b3 100644
--- a/includes/job/jobs/HTMLCacheUpdateJob.php
+++ b/includes/job/jobs/HTMLCacheUpdateJob.php
@@ -236,12 +236,9 @@
array( 'page_id' => $batch ) + $touchedCond,
__METHOD__
);
- # WM patch: throttle to avoid apache CPU exhaustion --
TS
- if ( php_sapi_name() == 'cli' ) {
- sleep( 1 );
- }
}
+ # Update squid
if ( $wgUseSquid ) {
$u = SquidUpdate::newFromTitles( $titleArray );
$u->doUpdate();
diff --git a/maintenance/tables.sql b/maintenance/tables.sql
index e501d35..97d6ff2 100644
--- a/maintenance/tables.sql
+++ b/maintenance/tables.sql
@@ -1141,9 +1141,9 @@
si_text mediumtext NOT NULL
) ENGINE=MyISAM;
--- CREATE UNIQUE INDEX /*i*/si_page ON /*_*/searchindex (si_page);
--- CREATE FULLTEXT INDEX /*i*/si_title ON /*_*/searchindex (si_title);
--- CREATE FULLTEXT INDEX /*i*/si_text ON /*_*/searchindex (si_text);
+CREATE UNIQUE INDEX /*i*/si_page ON /*_*/searchindex (si_page);
+CREATE FULLTEXT INDEX /*i*/si_title ON /*_*/searchindex (si_title);
+CREATE FULLTEXT INDEX /*i*/si_text ON /*_*/searchindex (si_text);
--
--
To view, visit https://gerrit.wikimedia.org/r/52065
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I26c418d631047783ba945e6b6a7f707d876b3146
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits