From: jenkins-bot Date: Mon, 4 May 2015 18:35:45 +0000 (+0000) Subject: Merge "Made wl_notificationtimestamp updates able to use queues" X-Git-Tag: 1.31.0-rc.0~11511 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=d892c0f86fc046831fe51bfa82399ba63e8fa631;hp=-c;p=lhc%2Fweb%2Fwiklou.git Merge "Made wl_notificationtimestamp updates able to use queues" --- d892c0f86fc046831fe51bfa82399ba63e8fa631 diff --combined includes/DefaultSettings.php index 28bead7d92,a9e16539dc..1a3fbbf5c8 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@@ -1587,6 -1587,15 +1587,15 @@@ $wgEnotifMaxRecips = 500 */ $wgEnotifUseJobQ = false; + /** + * Use the job queue for user activity updates like updating "last visited" + * fields for email notifications of page changes. This should only be enabled + * if the jobs have a dedicated runner to avoid update lag. + * + * @since 1.26 + */ + $wgActivityUpdatesUseJobQueue = false; + /** * Use real name instead of username in e-mail "from" field. */ @@@ -2148,13 -2157,11 +2157,13 @@@ $wgObjectCaches = array * cache with a relayer of type EventRelayerNull. * * The options are: + * - false: Configure the cache using $wgMainCacheType, without using + * a relayer (only matters if there are multiple data-centers) * - CACHE_NONE: Do not cache * - (other): A string may be used which identifies a cache * configuration in $wgWANObjectCaches. */ -$wgMainWANCache = CACHE_NONE; +$wgMainWANCache = false; /** * Advanced WAN object cache configuration. @@@ -5297,21 -5304,6 +5306,21 @@@ $wgDebugDumpSql = false */ $wgDebugDumpSqlLength = 500; +/** + * Performance expectations for DB usage + * + * @since 1.26 + */ +$wgTrxProfilerLimits = array( + // Basic GET and POST requests + 'GET' => array( 'masterConns' => 0, 'writes' => 0, 'readQueryTime' => 5 ), + 'POST' => array( 'maxAffected' => 500, 'readQueryTime' => 5, 'writeQueryTime' => 1 ), + // Background job runner + 'JobRunner' => array( 'maxAffected' => 500, 'readQueryTime' => 30, 'writeQueryTime' => 5 ), + // Command-line scripts + 'Maintenance' => array( 'maxAffected' => 1000, 'writeQueryTime' => 5 ) +); + /** * Map of string log group names to log destinations. * @@@ -6484,6 -6476,7 +6493,7 @@@ $wgJobClasses = array 'ThumbnailRender' => 'ThumbnailRenderJob', 'recentChangesUpdate' => 'RecentChangesUpdateJob', 'refreshLinksPrioritized' => 'RefreshLinksJob', // for cascading protection + 'activityUpdateJob' => 'ActivityUpdateJob', 'enqueue' => 'EnqueueJob', // local queue for multi-DC setups 'null' => 'NullJob' ); @@@ -6512,21 -6505,6 +6522,21 @@@ $wgJobTypesExcludedFromDefaultQueue = a */ $wgJobBackoffThrottling = array(); +/** + * Make job runners commit changes for slave-lag prone jobs one job at a time. + * This is useful if there are many job workers that race on slave lag checks. + * If set, jobs taking this many seconds of DB write time have serialized commits. + * + * Note that affected jobs may have worse lock contention. Also, if they affect + * several DBs at once they may have a smaller chance of being atomic due to the + * possibility of connection loss while queueing up to commit. Affected jobs may + * also fail due to the commit lock acquisition timeout. + * + * @var float|bool + * @since 1.26 + */ +$wgJobSerialCommitThreshold = false; + /** * Map of job types to configuration arrays. * This determines which queue class and storage system is used for each job type. diff --combined includes/User.php index 921d604c83,48372ca37a..429ae0e2f3 --- a/includes/User.php +++ b/includes/User.php @@@ -2252,6 -2252,8 +2252,6 @@@ class User implements IDBAccessObject * page. Ignored if null or !$val. */ public function setNewtalk( $val, $curRev = null ) { - global $wgMemc; - if ( wfReadOnly() ) { return; } @@@ -2273,6 -2275,12 +2273,6 @@@ $changed = $this->deleteNewtalk( $field, $id ); } - if ( $this->isAnon() ) { - // Anons have a separate memcached space, since - // user records aren't kept for them. - $key = wfMemcKey( 'newtalk', 'ip', $id ); - $wgMemc->set( $key, $val ? 1 : 0, 1800 ); - } if ( $changed ) { $this->invalidateCache(); } @@@ -3447,7 -3455,9 +3447,9 @@@ $force = 'force'; } - $this->getWatchedItem( $title )->resetNotificationTimestamp( $force, $oldid ); + $this->getWatchedItem( $title )->resetNotificationTimestamp( + $force, $oldid, WatchedItem::DEFERRED + ); } /**