Merge "Made wl_notificationtimestamp updates able to use queues"
[lhc/web/wiklou.git] / includes / DefaultSettings.php
index a9e1653..1a3fbbf 100644 (file)
@@ -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.
@@ -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.
  *
@@ -6505,6 +6522,21 @@ $wgJobTypesExcludedFromDefaultQueue = array( 'AssembleUploadChunks', 'PublishSta
  */
 $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.