*/
$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.
*/
* 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.
*/
$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.
*
'ThumbnailRender' => 'ThumbnailRenderJob',
'recentChangesUpdate' => 'RecentChangesUpdateJob',
'refreshLinksPrioritized' => 'RefreshLinksJob', // for cascading protection
+ 'activityUpdateJob' => 'ActivityUpdateJob',
'enqueue' => 'EnqueueJob', // local queue for multi-DC setups
'null' => 'NullJob'
);
*/
$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.
* page. Ignored if null or !$val.
*/
public function setNewtalk( $val, $curRev = null ) {
- global $wgMemc;
-
if ( wfReadOnly() ) {
return;
}
$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();
}
$force = 'force';
}
- $this->getWatchedItem( $title )->resetNotificationTimestamp( $force, $oldid );
+ $this->getWatchedItem( $title )->resetNotificationTimestamp(
+ $force, $oldid, WatchedItem::DEFERRED
+ );
}
/**