X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FDefaultSettings.php;h=f0e9e83a0e1fe863903922d79a834ab16c05d6b0;hb=8c261ee924ae27dcfca694f5e5233e81f12f5dc9;hp=fa6df8d6c01526c84e0e1614ed49d8f325eb956a;hpb=fd8a5d468934398595874783fa75ae2bf1b2b482;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index fa6df8d6c0..f0e9e83a0e 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1835,13 +1835,6 @@ $wgDBmwschema = null; */ $wgSQLiteDataDir = ''; -/** - * Make all database connections secretly go to localhost. Fool the load balancer - * thinking there is an arbitrarily large cluster of servers to connect to. - * Useful for debugging. - */ -$wgAllDBsAreLocalhost = false; - /** * Shared database for multiple wikis. Commonly used for storing a user table * for single sign-on. The server for this database must be the same as for the @@ -1895,7 +1888,7 @@ $wgSharedSchema = false; * - password: DB password * - type: DB type * - * - load: Ratio of DB_SLAVE load, must be >=0, the sum of all loads must be >0. + * - load: Ratio of DB_REPLICA load, must be >=0, the sum of all loads must be >0. * If this is zero for any given server, no normal query traffic will be * sent to it. It will be excluded from lag checks in maintenance scripts. * The only way it can receive traffic is if groupLoads is used. @@ -1904,7 +1897,7 @@ $wgSharedSchema = false; * to several groups, the most specific group defined here is used. * * - flags: bit field - * - DBO_DEFAULT -- turns on DBO_TRX only if !$wgCommandLineMode (recommended) + * - DBO_DEFAULT -- turns on DBO_TRX only if "cliMode" is off (recommended) * - DBO_DEBUG -- equivalent of $wgDebugDumpSql * - DBO_TRX -- wrap entire request in a transaction * - DBO_NOBUFFER -- turn off buffering (not useful in LocalSettings.php) @@ -1913,8 +1906,11 @@ $wgSharedSchema = false; * - DBO_COMPRESS -- uses internal compression in database connections, * if available * - * - max lag: (optional) Maximum replication lag before a slave will taken out of rotation + * - max lag: (optional) Maximum replication lag before a replica DB goes out of rotation * - is static: (optional) Set to true if the dataset is static and no replication is used. + * - cliMode: (optional) Connection handles will not assume that requests are short-lived + * nor that INSERT..SELECT can be rewritten into a buffered SELECT and INSERT. + * [Default: uses value of $wgCommandLineMode] * * These and any other user-defined properties will be assigned to the mLBInfo member * variable of the Database object. @@ -1924,15 +1920,15 @@ $wgSharedSchema = false; * perhaps in some command-line scripts). * * The first server listed in this array (with key 0) will be the master. The - * rest of the servers will be slaves. To prevent writes to your slaves due to + * rest of the servers will be replica DBs. To prevent writes to your replica DBs due to * accidental misconfiguration or MediaWiki bugs, set read_only=1 on all your - * slaves in my.cnf. You can set read_only mode at runtime using: + * replica DBs in my.cnf. You can set read_only mode at runtime using: * * @code * SET @@read_only=1; * @endcode * - * Since the effect of writing to a slave is so damaging and difficult to clean + * Since the effect of writing to a replica DB is so damaging and difficult to clean * up, we at Wikimedia set read_only=1 in my.cnf on all our DB servers, even * our masters, and then set read_only=0 on masters at runtime. */ @@ -2089,7 +2085,7 @@ $wgExternalStores = []; * Create a cluster named 'cluster1' containing three servers: * @code * $wgExternalServers = [ - * 'cluster1' => [ 'srv28', 'srv29', 'srv30' ] + * 'cluster1' => * ]; * @endcode * @@ -2120,7 +2116,7 @@ $wgDefaultExternalStore = false; * * Set to 0 to disable, or number of seconds before cache expiry. */ -$wgRevisionCacheExpiry = 0; +$wgRevisionCacheExpiry = 86400 * 7; /** @} */ # end text storage } @@ -2278,7 +2274,8 @@ $wgObjectCaches = [ 'class' => 'SqlBagOStuff', 'args' => [ [ 'slaveOnly' => false ] ] ], - 'loggroup' => 'SQLBagOStuff' + 'loggroup' => 'SQLBagOStuff', + 'reportDupes' => false ], 'apc' => [ 'class' => 'APCBagOStuff', 'reportDupes' => false ], @@ -2657,7 +2654,7 @@ $wgInternalServer = false; $wgSquidMaxage = 18000; /** - * Cache timeout for the CDN when DB slave lag is high + * Cache timeout for the CDN when DB replica DB lag is high * @see $wgSquidMaxage * @since 1.27 */ @@ -2667,7 +2664,7 @@ $wgCdnMaxageLagged = 30; * If set, any SquidPurge call on a URL or URLs will send a second purge no less than * this many seconds later via the job queue. This requires delayed job support. * This should be safely higher than the 'max lag' value in $wgLBFactoryConf, so that - * slave lag does not cause page to be stuck in stales states in CDN. + * replica DB lag does not cause page to be stuck in stales states in CDN. * * This also fixes race conditions in two-tiered CDN setups (e.g. cdn2 => cdn1 => MediaWiki). * If a purge for a URL reaches cdn2 before cdn1 and a request reaches cdn2 for that URL, @@ -4349,6 +4346,18 @@ $wgEnableScaryTranscluding = false; */ $wgTranscludeCacheExpiry = 3600; +/** + * Enable the magic links feature of automatically turning ISBN xxx, + * PMID xxx, RFC xxx into links + * + * @since 1.28 + */ +$wgEnableMagicLinks = [ + 'ISBN' => true, + 'PMID' => true, + 'RFC' => true +]; + /** @} */ # end of parser settings } /************************************************************************//** @@ -5073,6 +5082,7 @@ $wgGroupPermissions['user']['purge'] = true; $wgGroupPermissions['user']['sendemail'] = true; $wgGroupPermissions['user']['applychangetags'] = true; $wgGroupPermissions['user']['changetags'] = true; +$wgGroupPermissions['user']['editcontentmodel'] = true; // Implicit group for accounts that pass $wgAutoConfirmAge $wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true; @@ -5103,7 +5113,6 @@ $wgGroupPermissions['sysop']['undelete'] = true; $wgGroupPermissions['sysop']['editinterface'] = true; $wgGroupPermissions['sysop']['editusercss'] = true; $wgGroupPermissions['sysop']['edituserjs'] = true; -$wgGroupPermissions['sysop']['editcontentmodel'] = true; $wgGroupPermissions['sysop']['import'] = true; $wgGroupPermissions['sysop']['importupload'] = true; $wgGroupPermissions['sysop']['move'] = true; @@ -5577,6 +5586,11 @@ $wgRateLimits = [ 'ip' => [ 8, 60 ], 'newbie' => [ 8, 60 ], ], + // Changing the content model of a page + 'editcontentmodel' => [ + 'newbie' => [ 2, 120 ], + 'user' => [ 8, 60 ], + ], ]; /** @@ -5963,7 +5977,7 @@ $wgTrxProfilerLimits = [ 'POST' => [ 'readQueryTime' => 5, 'writeQueryTime' => 1, - 'maxAffected' => 500 + 'maxAffected' => 1000 ], 'POST-nonwrite' => [ 'masterConns' => 0, @@ -5974,7 +5988,7 @@ $wgTrxProfilerLimits = [ 'PostSend' => [ 'readQueryTime' => 5, 'writeQueryTime' => 1, - 'maxAffected' => 500 + 'maxAffected' => 1000 ], // Background job runner 'JobRunner' => [ @@ -6159,6 +6173,14 @@ $wgStatsdServer = false; */ $wgStatsdMetricPrefix = 'MediaWiki'; +/** + * Sampling rate for statsd metrics as an associative array of patterns and rates. + * Patterns are Unix shell patterns (e.g. 'MediaWiki.api.*'). + * Rates are sampling probabilities (e.g. 0.1 means 1 in 10 events are sampled). + * @since 1.28 + */ +$wgStatsdSamplingRates = []; + /** * InfoAction retrieves a list of transclusion links (both to and from). * This number puts a limit on that query in the case of highly transcluded @@ -7208,8 +7230,8 @@ $wgJobTypesExcludedFromDefaultQueue = [ 'AssembleUploadChunks', 'PublishStashedF $wgJobBackoffThrottling = []; /** - * 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. + * Make job runners commit changes for replica DB-lag prone jobs one job at a time. + * This is useful if there are many job workers that race on replica DB 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 @@ -7831,7 +7853,7 @@ $wgAPIMaxResultSize = 8388608; $wgAPIMaxUncachedDiffs = 1; /** - * Maximum amount of DB lag on a majority of DB slaves to tolerate + * Maximum amount of DB lag on a majority of DB replica DBs to tolerate * before forcing bots to retry any write requests via API errors. * This should be lower than the 'max lag' value in $wgLBFactoryConf. */ @@ -8263,7 +8285,7 @@ $wgPageLanguageUseDB = false; * Global configuration variable for Virtual REST Services. * * Use the 'path' key to define automatically mounted services. The value for this - * key is a map of path prefixes to service configuration. The later is an array of: + * key is a map of path prefixes to service configuration. The latter is an array of: * - class : the fully qualified class name * - options : map of arguments to the class constructor * Such services will be available to handle queries under their path from the VRS