Aaron Schulz [Wed, 7 Sep 2016 16:50:25 +0000 (09:50 -0700)]
Remove ancient DB_READ/DB_WRITE constants
Change-Id: I23f4c52312317e41710bc12eefe6e821f9b9e9f3
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
jenkins-bot [Wed, 7 Sep 2016 14:18:43 +0000 (14:18 +0000)]
Merge "Clarify that $terms get preg_quoted by caller in SearchHighlighter"
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
jenkins-bot [Wed, 7 Sep 2016 07:11:45 +0000 (07:11 +0000)]
Merge "resourceloader: Use createLoaderURL() in getStartupModulesUrl()"
jenkins-bot [Wed, 7 Sep 2016 07:04:59 +0000 (07:04 +0000)]
Merge "objectcache: add "hotTTR" and "ageNew" options to getWithSetCallback()"
jenkins-bot [Wed, 7 Sep 2016 06:56:40 +0000 (06:56 +0000)]
Merge "Clarify and update DeferredUpdates docs"
jenkins-bot [Wed, 7 Sep 2016 06:52:02 +0000 (06:52 +0000)]
Merge "Convert JobRunner to using beginMasterChanges()"
Aaron Schulz [Mon, 5 Sep 2016 03:09:30 +0000 (20:09 -0700)]
Clarify and update DeferredUpdates docs
Follows-up
dc0cdc8a4d
Change-Id: Ib70585d9d10f6f6493a625697243e0a67796c272
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"
jenkins-bot [Wed, 7 Sep 2016 06:45:55 +0000 (06:45 +0000)]
Merge "Replace unused LoadBalancer::waitTimeout() method with a config setting"
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
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
Aaron Schulz [Wed, 7 Sep 2016 04:45:54 +0000 (21:45 -0700)]
Remove return-by-reference PHP4-ism from getExternalLB()
Change-Id: Id6184a4a543196c4253dc9d930ac8ac0a9a5b0b0
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
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
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
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
Aaron Schulz [Tue, 6 Sep 2016 22:17:14 +0000 (15:17 -0700)]
Fix IDEA errors in JobRunner
Change-Id: I15939326afa80139a4d1000e43057b61cd374f18
jenkins-bot [Tue, 6 Sep 2016 21:55:23 +0000 (21:55 +0000)]
Merge "Disallow mismatched beginMasterChanges/commitMasterChanges"
jenkins-bot [Tue, 6 Sep 2016 21:20:32 +0000 (21:20 +0000)]
Merge "Rm unused 'remembermypassword' message, doc another"
jenkins-bot [Tue, 6 Sep 2016 21:03:27 +0000 (21:03 +0000)]
Merge "Turn off "reportDupes" in CachedBagOStuff"
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
Aaron Schulz [Tue, 6 Sep 2016 20:36:16 +0000 (13:36 -0700)]
Turn off "reportDupes" in CachedBagOStuff
Change-Id: I79148be842a940c92e555e10b24c32cdf7609539
Translation updater bot [Tue, 6 Sep 2016 20:09:23 +0000 (22:09 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I53d6598a7fdfc5af3b1afd61c182dc0e6491808d
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
jenkins-bot [Tue, 6 Sep 2016 18:55:02 +0000 (18:55 +0000)]
Merge "Add API warnings when upload is same as older versions"
jenkins-bot [Tue, 6 Sep 2016 18:46:41 +0000 (18:46 +0000)]
Merge "Fix default handling in LoadBalancer::getRandomNonLagged()"
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
jenkins-bot [Tue, 6 Sep 2016 18:24:29 +0000 (18:24 +0000)]
Merge "Fix spelling"
jenkins-bot [Tue, 6 Sep 2016 18:18:07 +0000 (18:18 +0000)]
Merge "Turn off duplicate key gets for ReplicatedBagOStuff"
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
jenkins-bot [Tue, 6 Sep 2016 15:56:17 +0000 (15:56 +0000)]
Merge "Rename mediawiki.action.history.diff to mediawiki.diff.styles"
Aaron Schulz [Mon, 29 Aug 2016 21:35:56 +0000 (14:35 -0700)]
Disallow mismatched beginMasterChanges/commitMasterChanges
Change-Id: I76a8424e94370dc3776fdac1e974bf61fa69f071
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
jenkins-bot [Tue, 6 Sep 2016 06:19:32 +0000 (06:19 +0000)]
Merge "Make deferred updates fully own their transaction rounds"
jenkins-bot [Tue, 6 Sep 2016 06:16:42 +0000 (06:16 +0000)]
Merge "Make Maintenance::commitTransaction() avoid using deprecated method"
Aaron Schulz [Tue, 6 Sep 2016 00:09:08 +0000 (17:09 -0700)]
Renamed some variables from "slave" to "replica"
Change-Id: I455278294cd7ea344d14a76ac5957ece2e07fbf3
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
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
Aaron Schulz [Tue, 6 Sep 2016 01:46:11 +0000 (18:46 -0700)]
Make Maintenance::commitTransaction() avoid using deprecated method
Change-Id: I0bbbdf492265f05ede4864aca0b4df15c3e83754
jenkins-bot [Tue, 6 Sep 2016 01:12:59 +0000 (01:12 +0000)]
Merge "Renamed "slave" internal LB/DB info field to "replica""
jenkins-bot [Tue, 6 Sep 2016 01:05:50 +0000 (01:05 +0000)]
Merge "Change "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
jenkins-bot [Mon, 5 Sep 2016 23:47:08 +0000 (23:47 +0000)]
Merge "Change "slave" => "replica DB" in /includes"
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
Aaron Schulz [Mon, 5 Sep 2016 20:21:26 +0000 (13:21 -0700)]
Change "slave" => "replica DB" in /includes
Change-Id: Icb716219c9335ff8fa447b1733d04b71d9712bf9
jenkins-bot [Mon, 5 Sep 2016 20:24:09 +0000 (20:24 +0000)]
Merge "Renamed load balancer replica DB functions for consistency"
Translation updater bot [Mon, 5 Sep 2016 20:02:17 +0000 (22:02 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: Id463a0ad9b2690bdcbd598605ec4b1a8e031ac48
Aaron Schulz [Mon, 5 Sep 2016 19:42:17 +0000 (12:42 -0700)]
Renamed load balancer replica DB functions for consistency
Change-Id: Iec51366d383822d2afbd3fae285e251b78b0cdc7
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
jenkins-bot [Mon, 5 Sep 2016 19:04:53 +0000 (19:04 +0000)]
Merge "Rename some variables in DatabaseMysqlBase"
jenkins-bot [Mon, 5 Sep 2016 19:01:08 +0000 (19:01 +0000)]
Merge "Remove unused DB position values in LoadBalancer"
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
jenkins-bot [Mon, 5 Sep 2016 12:10:24 +0000 (12:10 +0000)]
Merge "resourceloader: Make cache-eval in mw.loader.work asynchronous"
jenkins-bot [Mon, 5 Sep 2016 08:52:54 +0000 (08:52 +0000)]
Merge "Make statsd sampling rates configurable"
jenkins-bot [Mon, 5 Sep 2016 08:24:20 +0000 (08:24 +0000)]
Merge "Rename some DB/LB variables to be more consistent"
jenkins-bot [Mon, 5 Sep 2016 08:20:31 +0000 (08:20 +0000)]
Merge "Fix IDEA error in prepareQuickTemplate() call"
jenkins-bot [Mon, 5 Sep 2016 08:17:33 +0000 (08:17 +0000)]
Merge "Clean array() syntax in docs, part V"
jenkins-bot [Mon, 5 Sep 2016 06:14:45 +0000 (06:14 +0000)]
Merge "Typo in a test: '+' instead of '.' to concatenate strings"
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
Amir Sarabadani [Sun, 4 Sep 2016 22:14:26 +0000 (02:44 +0430)]
Clean array() syntax in docs, part V
Change-Id: Ic65b7b2f1c2396246a3825c8d06d42bd6d06c37e
Translation updater bot [Sun, 4 Sep 2016 19:56:54 +0000 (21:56 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: Ib2530497c22f021d77f3838f9b1b6d3043cc51bc
umherirrender [Sat, 25 Jun 2016 20:24:42 +0000 (22:24 +0200)]
Added a Database::buildStringCast and use on int/string join
The database specific sql is untested, but sql is taken from docs
mssql - knows about impilict casts -
https://technet.microsoft.com/en-us/library/ms191530(v=sql.105).aspx
mysql - knows about impilict casts
oracle - https://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqlj33562.html
postgresql -
https://www.postgresql.org/docs/9.2/static/sql-expressions.html#SQL-SYNTAX-TYPE-CASTS
sqlite - http://www.sqlite.org/lang_expr.html
Bug: T69065
Change-Id: I3a83276dc65aae58124460af1810d37dff52e943
jenkins-bot [Sat, 3 Sep 2016 23:08:37 +0000 (23:08 +0000)]
Merge "RevertAction: Prevent file revert if current version is identical"
Aaron Schulz [Sat, 3 Sep 2016 22:06:59 +0000 (15:06 -0700)]
Rename some variables in DatabaseMysqlBase
Positions may be MariaDB GTIDs, which can even be kept in sync
in master/master Galera setups.
See https://mariadb.com/kb/en/mariadb/gtid/
Change-Id: I3dc80ae099d0849e57a7278d662317da362ff8fc
Aaron Schulz [Sat, 3 Sep 2016 21:58:38 +0000 (14:58 -0700)]
Remove unused DB position values in LoadBalancer
Also fixed IDEA error about useless $conn declaration.
Change-Id: I73572cb201e44db45fbe9bdb8e06bff4b50cecb2
Aaron Schulz [Sat, 3 Sep 2016 21:55:39 +0000 (14:55 -0700)]
Rename some DB/LB variables to be more consistent
Change-Id: I21de9c972402144159b7b2fc824533f8cefb03e7
Translation updater bot [Sat, 3 Sep 2016 21:50:07 +0000 (23:50 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: Ib9a3add2d9502cfa52a9a464b92c21633028cca0
jenkins-bot [Sat, 3 Sep 2016 21:34:11 +0000 (21:34 +0000)]
Merge "Make replication DB-related comments/messages more uniform"
jenkins-bot [Sat, 3 Sep 2016 18:54:57 +0000 (18:54 +0000)]
Merge "OutputPage: Ensure setupSkinUserCss() always applies to headElement()"
Aaron Schulz [Sat, 3 Sep 2016 18:45:54 +0000 (11:45 -0700)]
Fix IDEA error in prepareQuickTemplate() call
Change-Id: I5ee3424c55a499296bfd417ed1eda49a06d2c3f9
Timo Tijhof [Tue, 30 Aug 2016 23:36:28 +0000 (16:36 -0700)]
OutputPage: Ensure setupSkinUserCss() always applies to headElement()
Follows-up
80e5b160e0, which had to move this call out of the
headElement() and buildCssLinks() methods as it was no longer
allowed to modify the module queue after it was created.
It was moved to OutputPage::output(), right before Skin::outputPage()
is called, which ends up calling headElement().
The point in time was effectively unchanged for page views.
However for the caller in ApiParse() this meant setupSkinUserCss()
no longer got called at all as it never calls output(), but instead
calls headElement() directly.
Move it to getRlClient(), which is where we set all other
OutputPage-specific things relating to module loading already.
* For page views this has no impact.
* For ApiParse it means headElement(), which calls getRlClient(),
will once again include skin stylesheets.
Bug: T144301
Change-Id: I5fd4a27fb2d70b98ce9161dc050788d8ac364110
Seb35 [Sat, 3 Sep 2016 14:29:13 +0000 (16:29 +0200)]
Typo in a test: '+' instead of '.' to concatenate strings
I found it by executing tests with PHP 7.1.0RC1, but even
if PHP 7.1.0 is still a RC, this is a typo in PHP language.
Change-Id: Ia97f881f8c80a23c51512189d9ca5a012612c532
Aaron Schulz [Sat, 3 Sep 2016 14:13:47 +0000 (07:13 -0700)]
Make replication DB-related comments/messages more uniform
Change-Id: If04254aad085c05d2a6b6588b4c9b55a1736110d
Aaron Schulz [Sat, 3 Sep 2016 13:44:31 +0000 (06:44 -0700)]
Make deferred updates fully own their transaction rounds
This will matter when commitMasterChanges() enforcement is tighter.
For now, any thing can still call that method anytime.
Change-Id: I0b08e9e9118a6c6118c117e3856d0a8e0ca3d457
jenkins-bot [Fri, 2 Sep 2016 23:56:26 +0000 (23:56 +0000)]
Merge "resourceloader: Shorten cache expiry if 'version' query doesn't match"
Timo Tijhof [Fri, 2 Sep 2016 22:44:59 +0000 (15:44 -0700)]
resourceloader: Shorten cache expiry if 'version' query doesn't match
Versioned load.php requests (load.php?modules=..&version=..) are highly
cacheable due to being versioned. When a module changes, the startup module
delivers new metadata to the client which naturally results in a cache miss
by producing a different url.
However, during upgrades and other deployments it was possible for a
multi-server installation to pollute edge caches with outdated content
in the following scenario:
* Deployment starts for an upgrade from version A to version B.
* Server 1 (on version B) gets a request for the startup manifest.
Client receives new manifest with version B information
and makes a versioned request for version B.
* Server 2 (still on version A) responds to this request with the
version it has (which is version A).
* Edge cache will store version A under the new url for version B.
This commit changes the last point by setting a low max-age when a request
has a 'version' hash mismatch.
Test plan:
* Look for a request in your browser like:
'/load.php?..modules=jquery%2Cmediawiki..&version=..'
* Verify it has a high Cache-Control max-age.
* Manipulate the 'version' parameter and verify it gets a low max-age.
Bug: T117587
Change-Id: Iba89c09b7b71d9fd2a8ff3ebe2618e26ea9daddf
Aaron Schulz [Fri, 2 Sep 2016 22:59:52 +0000 (15:59 -0700)]
Use WAN cache adaptiveTTL() method in FileBackendStore
Change-Id: I2e8b4e85b12c8892e8640abc63ee13b4b170645d
jenkins-bot [Fri, 2 Sep 2016 22:12:32 +0000 (22:12 +0000)]
Merge "Fix deletion handling of rev_deleted"
jenkins-bot [Fri, 2 Sep 2016 22:10:17 +0000 (22:10 +0000)]
Merge "Convert Revision::fetchFromConds() to using more modern selectRow()"
Aaron Schulz [Thu, 1 Sep 2016 12:42:01 +0000 (05:42 -0700)]
Fix deletion handling of rev_deleted
When the suppress button was not used, and some live
revisions had rev_deleted set, the query would try to
write the literal string "rev_deleted" as rev_deleted,
which was not noticed in default non-strict MySQL and
was casted to 0.
Follow-up to
673371e2c7
Bug: T144484
Change-Id: If3a74de13ea841d9d94ae05532cc8dadb0e40867
Aaron Schulz [Fri, 2 Sep 2016 13:46:56 +0000 (06:46 -0700)]
Convert Revision::fetchFromConds() to using more modern selectRow()
Change-Id: Icb3fa46beb7f49a43ffa40eb8f505a3717cd730b
jenkins-bot [Fri, 2 Sep 2016 21:02:13 +0000 (21:02 +0000)]
Merge "Rename CSS files for printing to a consistent file name"
Translation updater bot [Fri, 2 Sep 2016 20:15:53 +0000 (22:15 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I22dc4d60a502074f810a7ef5b704dd7bda05801f
jenkins-bot [Fri, 2 Sep 2016 19:59:58 +0000 (19:59 +0000)]
Merge "mw.Upload.BookletLayout: Use 'amenableparser' to handle templates in error messages"
jenkins-bot [Fri, 2 Sep 2016 18:27:22 +0000 (18:27 +0000)]
Merge "Add flushReplicaSnapshots() method for just clearing snapshots"
Chad Horohoe [Fri, 2 Sep 2016 18:15:02 +0000 (11:15 -0700)]
Don't mention $wgUser, it's ugly and it messes my grep-fu
Change-Id: Ic2b181a9f22f172aa8845a2e13bafa6142469ec4
Aaron Schulz [Fri, 2 Sep 2016 18:06:56 +0000 (11:06 -0700)]
Add flushReplicaSnapshots() method for just clearing snapshots
This is better than having to use the less safe commitAll(),
which also checks and commits masters with writes.
Change-Id: I01c95f1ebae6927ed5acf0c23dd19b5c2413f661
jenkins-bot [Fri, 2 Sep 2016 18:00:26 +0000 (18:00 +0000)]
Merge "Remove spammy reuseConnection() wfDebug() call"
jenkins-bot [Fri, 2 Sep 2016 17:48:28 +0000 (17:48 +0000)]
Merge "Clean up user handling in UploadStash"
Chad Horohoe [Fri, 2 Sep 2016 17:18:12 +0000 (10:18 -0700)]
Clean up user handling in UploadStash
- User parameter is now *required*, remove $wgUser fallback
- We don't actually need the object after construction, don't store it
Change-Id: Id0cc859b70e5d0608ffbfa591bce6a1feb7cc3be
jenkins-bot [Fri, 2 Sep 2016 17:40:33 +0000 (17:40 +0000)]
Merge "Let a few unit tests actually be unit tests"
Chad Horohoe [Fri, 2 Sep 2016 17:16:06 +0000 (10:16 -0700)]
Let a few unit tests actually be unit tests
MediaWikiTestCase is a terrible terrible thing with dumb overhead
Change-Id: I2a73a0f2819ed7e73b57642b7969036c2db2c991
jenkins-bot [Fri, 2 Sep 2016 17:08:38 +0000 (17:08 +0000)]
Merge "Make insertSelect() do two separate queries in non-CLI mode"
jenkins-bot [Fri, 2 Sep 2016 16:56:19 +0000 (16:56 +0000)]
Merge "Replace DataUpdate::doUpdates() callers in maintenance/"
Fomafix [Fri, 2 Sep 2016 15:08:39 +0000 (17:08 +0200)]
Rename CSS files for printing to a consistent file name
Change-Id: I868ecee47ed224ec05b41361727c2c67aebc474d
Aaron Schulz [Fri, 2 Sep 2016 15:36:08 +0000 (08:36 -0700)]
Remove spammy reuseConnection() wfDebug() call
This does not convey anything helpful and spam up debug
comment and jenkins logs
Change-Id: I7d20d061db28da3ba268255ecd71687a1eefb835
Glaisher [Sun, 14 Aug 2016 06:32:00 +0000 (11:32 +0500)]
Special:MovePage: Use LinkBatch when constructing subpages
Should help with T141029 and other cases, in general.
Bug: T141029
Change-Id: Iacda5acb0c569aa85eb328144c0af8d2cd07f126
Bartosz Dziewoński [Thu, 1 Sep 2016 21:49:19 +0000 (23:49 +0200)]
RevertAction: Prevent file revert if current version is identical
There are several reasons for this:
* The file thumbnail shown on the main file page is cached by the
browser, as images tend to be. This often confuses users into
thinking their revert did not work, and into attempting it again.
Recent examples:
* https://commons.wikimedia.org/wiki/Commons:Village_pump/Archive/2016/07#Wrong_SVG_rendering_on_File:DuckDuckGo_logo_and_wordmark.svg
* https://commons.wikimedia.org/w/index.php?title=Commons:Upload_help&oldid=
205348523#Reversion_is_not_working_for_me.
Ideally we'd prevent the caching, but preventing repeated reverts
should also work.
* Refreshing the success page causes the revert to be attempted again
(T53383). The usual solution to this is the Post/Redirect/Get
pattern, but we want to show a success message so that would require
some more changes (something similar to the post-edit notification).
* It can serve as a "revert conflict" detection mechanism, crude but
better than none.
In the unlikely case that uploading an identical older version of
the file is necessary, it can still be done using Special:Upload.
Bug: T53383
Change-Id: I37e04a536c5c2fc6cdbe59f6f598bb0c7f25d7a7