lhc/web/wiklou.git
7 years agoRollback: Change @since 1.27 to @since 1.28
Fomafix [Thu, 8 Sep 2016 04:13:09 +0000 (06:13 +0200)]
Rollback: Change @since 1.27 to @since 1.28

9af38c04 is not included in REL1.27.

Follows-up to 9af38c04

Change-Id: I377028aec91d15b63257baf522b5aa2dbd12d43b

7 years agoMerge "Run database-using tests in MySQL STRICT mode"
jenkins-bot [Thu, 8 Sep 2016 04:20:45 +0000 (04:20 +0000)]
Merge "Run database-using tests in MySQL STRICT mode"

7 years agoMerge "resourceloader: Preload WikiModule::getTitleInfo() in batches"
jenkins-bot [Thu, 8 Sep 2016 03:53:04 +0000 (03:53 +0000)]
Merge "resourceloader: Preload WikiModule::getTitleInfo() in batches"

7 years agoMerge "resourceloader: Simplify WikiModule::getTitleInfo() DB query"
jenkins-bot [Thu, 8 Sep 2016 03:42:53 +0000 (03:42 +0000)]
Merge "resourceloader: Simplify WikiModule::getTitleInfo() DB query"

7 years agoresourceloader: Preload WikiModule::getTitleInfo() in batches
Timo Tijhof [Thu, 8 Sep 2016 03:26:48 +0000 (20:26 -0700)]
resourceloader: Preload WikiModule::getTitleInfo() in batches

Test plan:
* Request load.php?modules=startup&only=scripts
* Debug log receives 1 entry in the 'queries' channel from
  ResourceLoaderWikiModule, and it comes from preloadTitleInfo.

Bug: T46362
Change-Id: I82e215745af6b8446cd69282b2c943afbbd45065

7 years agoresourceloader: Simplify WikiModule::getTitleInfo() DB query
Timo Tijhof [Thu, 8 Sep 2016 02:24:49 +0000 (19:24 -0700)]
resourceloader: Simplify WikiModule::getTitleInfo() DB query

While rev_sha1 was preferred to rev_id (page_latest) to allow
client-cache to be re-used in case of a bad change and revert,
this is no longer possible since we recently added support for
explicit purging by considering page_touched.

As such, use of rev_sha1 is no longer useful.

Change-Id: Iddb65305ca4655098fdea9fcf736fd4046035dd7

7 years agoAdd rate limits for changing a page's content model
Kunal Mehta [Thu, 8 Sep 2016 01:38:19 +0000 (18:38 -0700)]
Add rate limits for changing a page's content model

The defaults are set to the same value as page moves.

Change-Id: I72d6c35ecda475101c1c909715e4ba693dd214f6

7 years agoobjectcache: Avoid doxygen misformatting for pcGroup comments
Aaron Schulz [Thu, 8 Sep 2016 00:55:30 +0000 (17:55 -0700)]
objectcache: Avoid doxygen misformatting for pcGroup comments

Change-Id: I970bc9ccb04b046c563a357d87f814da652e23d2

7 years agoMerge "objectcache: add "pcGroup" option to WANObjectCache::getWithSetCallback()"
jenkins-bot [Thu, 8 Sep 2016 00:25:27 +0000 (00:25 +0000)]
Merge "objectcache: add "pcGroup" option to WANObjectCache::getWithSetCallback()"

7 years agoobjectcache: add "pcGroup" option to WANObjectCache::getWithSetCallback()
Aaron Schulz [Wed, 7 Sep 2016 22:36:14 +0000 (15:36 -0700)]
objectcache: add "pcGroup" option to WANObjectCache::getWithSetCallback()

This lets callers have their own process cache but keep it
managed in a central location, making it easier to reset
when DB transaction snapshot are flushed or when unit tests
want to clear caches between runs.

Use this to replace the Revision text process cache.

Change-Id: Ic61ee9140d4ce9836cc4650adb5bb75a291fea18

7 years agoMerge "SpecialDeletedContributions: Don't force a known link in subtitle"
jenkins-bot [Wed, 7 Sep 2016 22:16:43 +0000 (22:16 +0000)]
Merge "SpecialDeletedContributions: Don't force a known link in subtitle"

7 years agoresourceloader: Use makeVersionQuery for 'version' query parameter
Timo Tijhof [Wed, 7 Sep 2016 21:39:22 +0000 (14:39 -0700)]
resourceloader: Use makeVersionQuery for 'version' query parameter

makeVersionQuery and getCombinedVersion return the same string in
most cases, but there are exceptions, and it could diverge further
in the future. Use the semantically correct method.

Before 6fa1e56 it didn't matter how 'version' was computed as long
as it's deterministic and sufficiently unique. Now that we validate
the hashes it's important all methods use the same logic.

Rename method to makeVersionQuery since it's no longer used just
for comparison against the expected value.

Change-Id: I19f5818e27c8a0920d3d1374b40aeb0b6ba0b614

7 years agoMerge "RollbackAction: Allow 'from' to be an empty string"
jenkins-bot [Wed, 7 Sep 2016 21:17:47 +0000 (21:17 +0000)]
Merge "RollbackAction: Allow 'from' to be an empty string"

7 years agoRollbackAction: Allow 'from' to be an empty string
Timo Tijhof [Wed, 7 Sep 2016 20:52:42 +0000 (13:52 -0700)]
RollbackAction: Allow 'from' to be an empty string

Fix regression from 9af38c046c86, which made 'from' a required
non-empty parameter where previously an empty value was allowed.

The rollback links always include a 'from' parameter, but it is
set to an empty string by Revision::getUserText if the current
revision has its username hidden.

Test plan:
* Go to action=history, tick latest revision and "Change visibility".
* Tick "Editor's username" and apply the change.
* Hit "rollback" on the history page.
* Before: "missing parameter" error.
  After: Success.

Bug: T141985
Change-Id: I20d23e2aeec858f82231910c030c14ffa3af656f

7 years agoRevision: Simplify loadText() with nested getWithSetCallback
Timo Tijhof [Wed, 7 Sep 2016 01:34:43 +0000 (18:34 -0700)]
Revision: Simplify loadText() with nested getWithSetCallback

Check the MapCacheLRU::get() return value properly for misses
this time.

This reverts commit 1f022240c73f0909d8d3eb457ede12119190621a.

Change-Id: Ic95b79ad8d7d7c788f406d45c0e9bedeeb8d220b

7 years agoMerge "Revert "Revision: Simplify loadText() with nested getWithSetCallback""
jenkins-bot [Wed, 7 Sep 2016 20:42:56 +0000 (20:42 +0000)]
Merge "Revert "Revision: Simplify loadText() with nested getWithSetCallback""

7 years agoMerge "Documentation: Replace misuse of 'later' when we meant 'latter'"
jenkins-bot [Wed, 7 Sep 2016 20:36:16 +0000 (20:36 +0000)]
Merge "Documentation: Replace misuse of 'later' when we meant 'latter'"

7 years agoRevert "Revision: Simplify loadText() with nested getWithSetCallback"
Mattflaschen [Wed, 7 Sep 2016 20:34:58 +0000 (20:34 +0000)]
Revert "Revision: Simplify loadText() with nested getWithSetCallback"

This reverts commit aa0f6ead348d0aa3f59d51df0806e95eb76babf8.

Change-Id: I285ada2e86f014b93c7e7946f10d2dc84375fcff

7 years agoMerge "Fix ApiStashEdit IDEA warnings"
jenkins-bot [Wed, 7 Sep 2016 20:23:16 +0000 (20:23 +0000)]
Merge "Fix ApiStashEdit IDEA warnings"

7 years agoDocumentation: Replace misuse of 'later' when we meant 'latter'
James D. Forrester [Wed, 7 Sep 2016 20:12:38 +0000 (13:12 -0700)]
Documentation: Replace misuse of 'later' when we meant 'latter'

Change-Id: I01bfdb8e0bfaa132533732873f7c840cea7935eb

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 7 Sep 2016 20:08:41 +0000 (22:08 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ib4a52f1616cdf4ed928731f1341e094a7f35092b

7 years agoTrivial: Typo fix in comment
Subramanya Sastry [Wed, 7 Sep 2016 19:43:57 +0000 (14:43 -0500)]
Trivial: Typo fix in comment

Change-Id: I7ad1ee3ca1e3007e70b5566209e3bbbc9b19201a

7 years agoFix ApiStashEdit IDEA warnings
Aaron Schulz [Wed, 7 Sep 2016 19:00:52 +0000 (12:00 -0700)]
Fix ApiStashEdit IDEA warnings

Change-Id: Icc1d0225908e432df10c36d69c6ed282f8761198

7 years agoMerge "Revision: Simplify loadText() with nested getWithSetCallback"
jenkins-bot [Wed, 7 Sep 2016 18:55:11 +0000 (18:55 +0000)]
Merge "Revision: Simplify loadText() with nested getWithSetCallback"

7 years agoMerge "Style and IDEA warning cleanups"
jenkins-bot [Wed, 7 Sep 2016 18:48:36 +0000 (18:48 +0000)]
Merge "Style and IDEA warning cleanups"

7 years agoRevision: Simplify loadText() with nested getWithSetCallback
Timo Tijhof [Wed, 7 Sep 2016 01:34:43 +0000 (18:34 -0700)]
Revision: Simplify loadText() with nested getWithSetCallback

The logic was a bit hard to follow as there were two layers of
caching and a conditional (expiry being set).

* Move fetch logic for revision text to a private method.
* Call directly when cache is disabled.
* Simplify cache has/get/set by using getWithSetCallback.

Change-Id: Icd74cd8e944266c20dc7c5cb25f56300636dce1e

7 years agoMerge "Grant 'editcontentmodel' permission to 'user' group"
jenkins-bot [Wed, 7 Sep 2016 18:31:24 +0000 (18:31 +0000)]
Merge "Grant 'editcontentmodel' permission to 'user' group"

7 years agoMerge "Remove ancient DB_READ/DB_WRITE constants"
jenkins-bot [Wed, 7 Sep 2016 18:16:40 +0000 (18:16 +0000)]
Merge "Remove ancient DB_READ/DB_WRITE constants"

7 years agoMerge "Avoid redundant COMMIT calls on page views"
jenkins-bot [Wed, 7 Sep 2016 18:08:47 +0000 (18:08 +0000)]
Merge "Avoid redundant COMMIT calls on page views"

7 years agoGrant 'editcontentmodel' permission to 'user' group
Kunal Mehta [Wed, 7 Sep 2016 18:00:42 +0000 (11:00 -0700)]
Grant 'editcontentmodel' permission to 'user' group

Bug: T85847
Change-Id: Iad834e757ac6f37ad64ac9e93afe93160aabc842

7 years agoAvoid redundant COMMIT calls on page views
Aaron Schulz [Wed, 7 Sep 2016 16:07:01 +0000 (09:07 -0700)]
Avoid redundant COMMIT calls on page views

These just clear empty transactions and do not do anything
otherwise. No need in doing a few extra RTTs for that.

This also avoids "could not COMMIT" errors when transaction
callbacks do silly things like add more callbacks to outside
DBs. In that case, they either ran their callbacks already or
calling clearSnapshot() will error out.

Change-Id: I4d52c4ef69b02a33adffd8892b98ad1bd5c7d6dc

7 years agoSpecialDeletedContributions: Don't force a known link in subtitle
Florian Schmidt [Wed, 7 Sep 2016 17:15:59 +0000 (19:15 +0200)]
SpecialDeletedContributions: Don't force a known link in subtitle

The link to the user page isn't known by default, as it should be
marked as "red"/non-existing page, if the user page isn't created,
yet.

Bug: T144012
Change-Id: Ie8b70d05915ef6189dfb9acd4ebf1d1391f58b3c

7 years agoMerge "API: Fix query+authmanagerinfo example message names"
jenkins-bot [Wed, 7 Sep 2016 17:02:14 +0000 (17:02 +0000)]
Merge "API: Fix query+authmanagerinfo example message names"

7 years agoRemove ancient DB_READ/DB_WRITE constants
Aaron Schulz [Wed, 7 Sep 2016 16:50:25 +0000 (09:50 -0700)]
Remove ancient DB_READ/DB_WRITE constants

Change-Id: I23f4c52312317e41710bc12eefe6e821f9b9e9f3

7 years agoMerge "SpecialUpload: Give a context title to getExistsWarning() messages"
jenkins-bot [Wed, 7 Sep 2016 16:41:48 +0000 (16:41 +0000)]
Merge "SpecialUpload: Give a context title to getExistsWarning() messages"

7 years agoMake adaptiveTTL() less strict about $mtime type
Aaron Schulz [Wed, 7 Sep 2016 16:18:37 +0000 (09:18 -0700)]
Make adaptiveTTL() less strict about $mtime type

Callers using wfTimestamp( TS_UNIX, ... ) where getting $minTTL
due to the output being a string number.

Change-Id: I6b67a941940f40ef9a543f11d0dbccacafaaa53b

7 years agoStyle and IDEA warning cleanups
Aaron Schulz [Wed, 7 Sep 2016 15:40:39 +0000 (08:40 -0700)]
Style and IDEA warning cleanups

* Avoid deprecated method use in MediaWiki.php.
* Move LBFactory::beginMasterChanges down a bit, next
  to LBFactory::commitMasterChanges.
* Rename $factory => $lbFactory.
* Remove redundant $conn->trxLevel() check.

Change-Id: I309ff3b8e3f586f0ac40b2f3be26b161993b58d2

7 years agoMerge "Clarify that $terms get preg_quoted by caller in SearchHighlighter"
jenkins-bot [Wed, 7 Sep 2016 14:18:43 +0000 (14:18 +0000)]
Merge "Clarify that $terms get preg_quoted by caller in SearchHighlighter"

7 years agoRun database-using tests in MySQL STRICT mode
Aaron Schulz [Fri, 2 Sep 2016 16:57:40 +0000 (09:57 -0700)]
Run database-using tests in MySQL STRICT mode

Change-Id: Ib2873913102d7a7fcd84d1860725fb501cb41b64

7 years agoCache NS_TEMPLATE/NS_FILE titles in LinkCache persistently
Aaron Schulz [Fri, 2 Sep 2016 14:19:13 +0000 (07:19 -0700)]
Cache NS_TEMPLATE/NS_FILE titles in LinkCache persistently

Queries from parsing are the top use of selectRow() according
to reverse flame graphs on xenon. This does not bother with
pages in namespaces less likely to be included.

Change-Id: Ica5d6e52c830cd71effff21933b8c64691082c11

7 years agoMerge "resourceloader: Use createLoaderURL() in getStartupModulesUrl()"
jenkins-bot [Wed, 7 Sep 2016 07:11:45 +0000 (07:11 +0000)]
Merge "resourceloader: Use createLoaderURL() in getStartupModulesUrl()"

7 years agoMerge "objectcache: add "hotTTR" and "ageNew" options to getWithSetCallback()"
jenkins-bot [Wed, 7 Sep 2016 07:04:59 +0000 (07:04 +0000)]
Merge "objectcache: add "hotTTR" and "ageNew" options to getWithSetCallback()"

7 years agoMerge "Clarify and update DeferredUpdates docs"
jenkins-bot [Wed, 7 Sep 2016 06:56:40 +0000 (06:56 +0000)]
Merge "Clarify and update DeferredUpdates docs"

7 years agoMerge "Convert JobRunner to using beginMasterChanges()"
jenkins-bot [Wed, 7 Sep 2016 06:52:02 +0000 (06:52 +0000)]
Merge "Convert JobRunner to using beginMasterChanges()"

7 years agoClarify and update DeferredUpdates docs
Aaron Schulz [Mon, 5 Sep 2016 03:09:30 +0000 (20:09 -0700)]
Clarify and update DeferredUpdates docs

Follows-up dc0cdc8a4d

Change-Id: Ib70585d9d10f6f6493a625697243e0a67796c272

7 years agoMerge "Fixup some rc_* fields if empty for STRICT mode in RecentChange"
jenkins-bot [Wed, 7 Sep 2016 06:47:33 +0000 (06:47 +0000)]
Merge "Fixup some rc_* fields if empty for STRICT mode in RecentChange"

7 years agoMerge "Replace unused LoadBalancer::waitTimeout() method with a config setting"
jenkins-bot [Wed, 7 Sep 2016 06:45:55 +0000 (06:45 +0000)]
Merge "Replace unused LoadBalancer::waitTimeout() method with a config setting"

7 years agoobjectcache: add "hotTTR" and "ageNew" options to getWithSetCallback()
Aaron Schulz [Sat, 27 Aug 2016 22:33:36 +0000 (15:33 -0700)]
objectcache: add "hotTTR" and "ageNew" options to getWithSetCallback()

These control worthRefreshPopular(), which will try to make sure that
heavily used keys are kept more consistent than others.

Change-Id: I2d351b50462a96d0fa8ca8fa6d28d51d3a5c94ff

7 years agoReplace unused LoadBalancer::waitTimeout() method with a config setting
Aaron Schulz [Wed, 7 Sep 2016 04:57:20 +0000 (21:57 -0700)]
Replace unused LoadBalancer::waitTimeout() method with a config setting

Change-Id: Ide390738be0ff537580002501c380a0507dab1e5

7 years agoRemove return-by-reference PHP4-ism from getExternalLB()
Aaron Schulz [Wed, 7 Sep 2016 04:45:54 +0000 (21:45 -0700)]
Remove return-by-reference PHP4-ism from getExternalLB()

Change-Id: Id6184a4a543196c4253dc9d930ac8ac0a9a5b0b0

7 years agoConvert JobRunner to using beginMasterChanges()
Aaron Schulz [Tue, 6 Sep 2016 22:25:53 +0000 (15:25 -0700)]
Convert JobRunner to using beginMasterChanges()

This lets the runJobs.php $wgCommandLineMode hack be removed.

Some fixes based on unit tests:
* Only call applyTransactionRoundFlags() for master connections
  for transaction rounds from beginMasterChanges().
* Also cleaned up the commitAndWaitForReplication() reset logic.
* Removed deprecated DataUpdate::doUpdate() calls from jobs
  since they cannot nest in a transaction round.

Change-Id: Ia9b91f539dc11a5c05bdac4bcd99d6615c4dc48d

7 years agoresourceloader: Use createLoaderURL() in getStartupModulesUrl()
Timo Tijhof [Wed, 7 Sep 2016 02:31:22 +0000 (19:31 -0700)]
resourceloader: Use createLoaderURL() in getStartupModulesUrl()

Avoid manually crafting a url. The packing logic and key sorting logic
is already in this method and keeps it central that way.

Test plan:
* Check output of /w/load.php?modules=startup&only=scripts.
  This is used to construct the url to 'jquery%2Cmediawiki'.
  No change in output.

Change-Id: I51ba51b6e74d78761108341c0ee318699ca7952f

7 years agofilecache: Remove unused ObjectFileCache class
Timo Tijhof [Wed, 7 Sep 2016 00:09:50 +0000 (17:09 -0700)]
filecache: Remove unused ObjectFileCache class

This was originally intended for use by ResourceLoader but it was
incomplete and not actually used by ResourceLoader at first.

Then 93d358cd added support for FileCache to ResourceLoader with
a separate ResourceFileCache class.

Also fixed typo in HTMLFileCache from 6559b8bf.

ObjectFileCache is not mentioned anywhere else in Wikimedia Git.

Change-Id: I69cca27ee7cd922da12f1793660432709c273be6

7 years agoFixup some rc_* fields if empty for STRICT mode in RecentChange
Aaron Schulz [Fri, 2 Sep 2016 20:09:19 +0000 (13:09 -0700)]
Fixup some rc_* fields if empty for STRICT mode in RecentChange

Change-Id: Ie3849f5df8bc4f98d668ed024a052523357d3514

7 years agoFix IDEA errors in JobRunner
Aaron Schulz [Tue, 6 Sep 2016 22:17:14 +0000 (15:17 -0700)]
Fix IDEA errors in JobRunner

Change-Id: I15939326afa80139a4d1000e43057b61cd374f18

7 years agoMerge "Disallow mismatched beginMasterChanges/commitMasterChanges"
jenkins-bot [Tue, 6 Sep 2016 21:55:23 +0000 (21:55 +0000)]
Merge "Disallow mismatched beginMasterChanges/commitMasterChanges"

7 years agoMerge "Rm unused 'remembermypassword' message, doc another"
jenkins-bot [Tue, 6 Sep 2016 21:20:32 +0000 (21:20 +0000)]
Merge "Rm unused 'remembermypassword' message, doc another"

7 years agoMerge "Turn off "reportDupes" in CachedBagOStuff"
jenkins-bot [Tue, 6 Sep 2016 21:03:27 +0000 (21:03 +0000)]
Merge "Turn off "reportDupes" in CachedBagOStuff"

7 years agoDefer publish of recent change for log entries
cenarium [Tue, 23 Feb 2016 02:16:42 +0000 (03:16 +0100)]
Defer publish of recent change for log entries

This defers the publish function of ManualLogEntry, which includes
saving the recent change to the db, notification of feeds, auto-patrol
and addition of change tags. This way, end users no longer have to wait
for those actions to conclude for the request to complete.

Bug: T127852
Change-Id: Ida86b7a7383d12695be28338c69b93e8e86d82c9

7 years agoSpecialUpload: Give a context title to getExistsWarning() messages
Chad Horohoe [Tue, 6 Sep 2016 20:14:35 +0000 (13:14 -0700)]
SpecialUpload: Give a context title to getExistsWarning() messages

Parsed messages should always have a context title to parse in

Change-Id: I69ceaf7d0fe7e8f5f868b9119aea1fd3a0e73400

7 years agoTurn off "reportDupes" in CachedBagOStuff
Aaron Schulz [Tue, 6 Sep 2016 20:36:16 +0000 (13:36 -0700)]
Turn off "reportDupes" in CachedBagOStuff

Change-Id: I79148be842a940c92e555e10b24c32cdf7609539

7 years agoAPI: Fix query+authmanagerinfo example message names
Brad Jorsch [Tue, 6 Sep 2016 20:32:57 +0000 (16:32 -0400)]
API: Fix query+authmanagerinfo example message names

When code was copy-pasted to create the module, apparently the messages
didn't get renamed correctly.

Change-Id: I1bab2ed5a2b014602b6c3dc1e53a4ce53f78fa6f

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 6 Sep 2016 20:09:23 +0000 (22:09 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I53d6598a7fdfc5af3b1afd61c182dc0e6491808d

7 years agoClarify that $terms get preg_quoted by caller in SearchHighlighter
Brian Wolff [Tue, 6 Sep 2016 19:42:12 +0000 (19:42 +0000)]
Clarify that $terms get preg_quoted by caller in SearchHighlighter

Also fix misleading comment about which highlighter implementation
is default.

Change-Id: Ifb4d7fa79ec6325bdb0667fc10b6a1547b32ef69

7 years agoMerge "Add API warnings when upload is same as older versions"
jenkins-bot [Tue, 6 Sep 2016 18:55:02 +0000 (18:55 +0000)]
Merge "Add API warnings when upload is same as older versions"

7 years agoMerge "Fix default handling in LoadBalancer::getRandomNonLagged()"
jenkins-bot [Tue, 6 Sep 2016 18:46:41 +0000 (18:46 +0000)]
Merge "Fix default handling in LoadBalancer::getRandomNonLagged()"

7 years agoAdd API warnings when upload is same as older versions
Matthias Mullie [Wed, 24 Aug 2016 07:29:24 +0000 (09:29 +0200)]
Add API warnings when upload is same as older versions

Bug: T141822
Change-Id: I115d84d865c59200dbb60bd962c093185c9afafe

7 years agoMerge "Fix spelling"
jenkins-bot [Tue, 6 Sep 2016 18:24:29 +0000 (18:24 +0000)]
Merge "Fix spelling"

7 years agoMerge "Turn off duplicate key gets for ReplicatedBagOStuff"
jenkins-bot [Tue, 6 Sep 2016 18:18:07 +0000 (18:18 +0000)]
Merge "Turn off duplicate key gets for ReplicatedBagOStuff"

7 years agoFix spelling
Adam Roses Wight [Tue, 6 Sep 2016 16:49:35 +0000 (09:49 -0700)]
Fix spelling

However... this comment might be irrelevant.  The code is actually joining 8
random 1-byte integers together (all produced by the same algorithm).  We're
clearly attempting to make a number with 64 bits of entropy, and the comment
is quite oblique about that fact.

Change-Id: I59ac0c208bdb9d7f427fea4f205ee7293a710ca8

7 years agoMerge "Rename mediawiki.action.history.diff to mediawiki.diff.styles"
jenkins-bot [Tue, 6 Sep 2016 15:56:17 +0000 (15:56 +0000)]
Merge "Rename mediawiki.action.history.diff to mediawiki.diff.styles"

7 years agoDisallow mismatched beginMasterChanges/commitMasterChanges
Aaron Schulz [Mon, 29 Aug 2016 21:35:56 +0000 (14:35 -0700)]
Disallow mismatched beginMasterChanges/commitMasterChanges

Change-Id: I76a8424e94370dc3776fdac1e974bf61fa69f071

7 years agoRename mediawiki.action.history.diff to mediawiki.diff.styles
Leszek Manicki [Wed, 31 Aug 2016 08:14:48 +0000 (10:14 +0200)]
Rename mediawiki.action.history.diff to mediawiki.diff.styles

Diff is not shown on action=history, so the name was not valid.
This module contains only styles, so let's make it explicit in its name too.

mediawiki.action.history.diff module is temporarily left for
backwards compatibility. It should be removed when no longer used.

This also renames docs/uidesign/mediawiki.action.history.diff.html
to docs/uidesign/mediawiki.diff.html.

Change-Id: I7ecc08417c5f1870ed6f2ca139fd953d68f6ec8e

7 years agoMerge "Make deferred updates fully own their transaction rounds"
jenkins-bot [Tue, 6 Sep 2016 06:19:32 +0000 (06:19 +0000)]
Merge "Make deferred updates fully own their transaction rounds"

7 years agoMerge "Make Maintenance::commitTransaction() avoid using deprecated method"
jenkins-bot [Tue, 6 Sep 2016 06:16:42 +0000 (06:16 +0000)]
Merge "Make Maintenance::commitTransaction() avoid using deprecated method"

7 years agoRenamed some variables from "slave" to "replica"
Aaron Schulz [Tue, 6 Sep 2016 00:09:08 +0000 (17:09 -0700)]
Renamed some variables from "slave" to "replica"

Change-Id: I455278294cd7ea344d14a76ac5957ece2e07fbf3

7 years agoMore replication var cleanups in /maintenance
Aaron Schulz [Tue, 6 Sep 2016 01:30:36 +0000 (18:30 -0700)]
More replication var cleanups in /maintenance

* Fix option check in sql.php
* Rename RecompressTracked vars and avoid deprecated
  method calls

Change-Id: Ie04f6e841d68d69c9243a185de1bd13a612b2070

7 years agoRename DB_SLAVE constant to DB_REPLICA
Aaron Schulz [Mon, 5 Sep 2016 19:55:19 +0000 (12:55 -0700)]
Rename DB_SLAVE constant to DB_REPLICA

This is more consistent with LoadBalancer, modern, and inclusive
of master/master mysql, NDB cluster, and MariaDB galera cluster.

The old constant is an alias now.

Change-Id: I0b37299ecb439cc446ffbe8c341365d1eef45849

7 years agoMake Maintenance::commitTransaction() avoid using deprecated method
Aaron Schulz [Tue, 6 Sep 2016 01:46:11 +0000 (18:46 -0700)]
Make Maintenance::commitTransaction() avoid using deprecated method

Change-Id: I0bbbdf492265f05ede4864aca0b4df15c3e83754

7 years agoMerge "Renamed "slave" internal LB/DB info field to "replica""
jenkins-bot [Tue, 6 Sep 2016 01:12:59 +0000 (01:12 +0000)]
Merge "Renamed "slave" internal LB/DB info field to "replica""

7 years agoMerge "Change "slave" => "replica DB" in /maintenance"
jenkins-bot [Tue, 6 Sep 2016 01:05:50 +0000 (01:05 +0000)]
Merge "Change "slave" => "replica DB" in /maintenance"

7 years agoChange "slave" => "replica DB" in /maintenance
Aaron Schulz [Mon, 5 Sep 2016 20:14:41 +0000 (13:14 -0700)]
Change "slave" => "replica DB" in /maintenance

Change-Id: Ibd3d617901130378a935402326cd4eefbb382c9e

7 years agoMerge "Change "slave" => "replica DB" in /includes"
jenkins-bot [Mon, 5 Sep 2016 23:47:08 +0000 (23:47 +0000)]
Merge "Change "slave" => "replica DB" in /includes"

7 years agoTurn off duplicate key gets for ReplicatedBagOStuff
Aaron Schulz [Mon, 5 Sep 2016 21:23:41 +0000 (14:23 -0700)]
Turn off duplicate key gets for ReplicatedBagOStuff

This is used as the main stash by default, which is not a
performance cache but a stash for ephemeral values typically.

Change-Id: Ie3740c0387f36a3f9b2d8d7d3b4e04ee9238ab1a

7 years agoChange "slave" => "replica DB" in /includes
Aaron Schulz [Mon, 5 Sep 2016 20:21:26 +0000 (13:21 -0700)]
Change "slave" => "replica DB" in /includes

Change-Id: Icb716219c9335ff8fa447b1733d04b71d9712bf9

7 years agoMerge "Renamed load balancer replica DB functions for consistency"
jenkins-bot [Mon, 5 Sep 2016 20:24:09 +0000 (20:24 +0000)]
Merge "Renamed load balancer replica DB functions for consistency"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 5 Sep 2016 20:02:17 +0000 (22:02 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Id463a0ad9b2690bdcbd598605ec4b1a8e031ac48

7 years agoRenamed load balancer replica DB functions for consistency
Aaron Schulz [Mon, 5 Sep 2016 19:42:17 +0000 (12:42 -0700)]
Renamed load balancer replica DB functions for consistency

Change-Id: Iec51366d383822d2afbd3fae285e251b78b0cdc7

7 years agoRenamed "slave" internal LB/DB info field to "replica"
Aaron Schulz [Mon, 5 Sep 2016 19:19:00 +0000 (12:19 -0700)]
Renamed "slave" internal LB/DB info field to "replica"

Change-Id: I46379013ddbdfdf03dbae0c6071e3dc0d960332d

7 years agoMerge "Rename some variables in DatabaseMysqlBase"
jenkins-bot [Mon, 5 Sep 2016 19:04:53 +0000 (19:04 +0000)]
Merge "Rename some variables in DatabaseMysqlBase"

7 years agoMerge "Remove unused DB position values in LoadBalancer"
jenkins-bot [Mon, 5 Sep 2016 19:01:08 +0000 (19:01 +0000)]
Merge "Remove unused DB position values in LoadBalancer"

7 years agoFix default handling in LoadBalancer::getRandomNonLagged()
Aaron Schulz [Mon, 5 Sep 2016 18:49:36 +0000 (11:49 -0700)]
Fix default handling in LoadBalancer::getRandomNonLagged()

* Previously, setting "max lag" greater than MAX_LAG had no effect.
  Although that only affects really large (11+ seconds) values for
  a production setup, it could be useful for testing.
* Also make it so INF works, which disables auto read-only mode
  altogether. This is useful for testing bugs with REPEATABLE-READ
  and replica DB usage. Setting $wgDBServers two have two entries
  to the same single DB makes LB treat it like a cluster, thus
  DB_SLAVE uses a second connection (and snapshot). Using the INF
  "max lag" value avoids read-only mode in this testing setup.

Change-Id: I4c17fe8f812307e90bcc24820f57c6a1257e9ad0

7 years agoMerge "resourceloader: Make cache-eval in mw.loader.work asynchronous"
jenkins-bot [Mon, 5 Sep 2016 12:10:24 +0000 (12:10 +0000)]
Merge "resourceloader: Make cache-eval in mw.loader.work asynchronous"

7 years agoMerge "Make statsd sampling rates configurable"
jenkins-bot [Mon, 5 Sep 2016 08:52:54 +0000 (08:52 +0000)]
Merge "Make statsd sampling rates configurable"

7 years agoMerge "Rename some DB/LB variables to be more consistent"
jenkins-bot [Mon, 5 Sep 2016 08:24:20 +0000 (08:24 +0000)]
Merge "Rename some DB/LB variables to be more consistent"

7 years agoMerge "Fix IDEA error in prepareQuickTemplate() call"
jenkins-bot [Mon, 5 Sep 2016 08:20:31 +0000 (08:20 +0000)]
Merge "Fix IDEA error in prepareQuickTemplate() call"

7 years agoMerge "Clean array() syntax in docs, part V"
jenkins-bot [Mon, 5 Sep 2016 08:17:33 +0000 (08:17 +0000)]
Merge "Clean array() syntax in docs, part V"

7 years agoMerge "Typo in a test: '+' instead of '.' to concatenate strings"
jenkins-bot [Mon, 5 Sep 2016 06:14:45 +0000 (06:14 +0000)]
Merge "Typo in a test: '+' instead of '.' to concatenate strings"

7 years agoCache revision lookups done by Parser
Aaron Schulz [Fri, 2 Sep 2016 07:30:26 +0000 (00:30 -0700)]
Cache revision lookups done by Parser

Inverse flame graphs shows revision lookups as one of the
big three queries (Revision, LinkCache, getTitleInfo of
ResourceLoaderWikiModule).

This works via a new Revision::newKnownCurrent() method
needs both page/rev ID from the DB (to avoid invalidation)
and fetches the user name and rev_deleted if needed (again
to avoid invalidation). Parser does not care about fields
anyway in the template path.

Also improved cross-wiki support a bit, and fixed up some
docs and IDEA errors.

Change-Id: Icad602dba5de18c7758b77fd23b0a450ff21d09f

7 years agoClean array() syntax in docs, part V
Amir Sarabadani [Sun, 4 Sep 2016 22:14:26 +0000 (02:44 +0430)]
Clean array() syntax in docs, part V

Change-Id: Ic65b7b2f1c2396246a3825c8d06d42bd6d06c37e