Current configuration on the wiki
Find a file
Aaron Schulz 4b7ddd3c67 deferred: make DeferredUpdates::doUpdates() recursion more uniform
Follow-up ba6490aa1e.

That patch worked around $executeContext iteration errors due to the
lack of recursion support in doUpdates()/handleUpdateQueue(). Errors
were triggered by MediaWiki::schedulePostSendJobs() enqueueing deferred
updates that invoke JobRunner::run(), which, in turn, invoke doUpdates()
for each job via JobRunner:: doExecuteJob(). The doUpdates() method was
changed to operate on the sub-queue for the in-progress DeferrableUpdate.

Further improve the recursion logic:
* Use classes for the scope stack and scope queues.
* Put *all* updates added during a DeferrableUpdate::doUpdate() call into
  the subqueue, regardless of "defer until" stage or whether it implements
  MergeableUpdate. Now, doUpdate() can run *everything* it enqueued instead
  of a non-obvious subset. Note that the TransactionRoundDefiningUpdate
  that invokes JobRunner was already a POSTSEND update before ba6490aa1eb;
  the only effect of this change is that MergeableUpdate instances from jobs
  will once again run in doExecuteJob().
* Make recursive DeferredUpdates::doUpdate() calls error out immediately
  unless the DeferrableUpdate responsible is a TransactionRoundAwareUpdate
  with the TRX_ROUND_ABSENT flag. This covers the schedulePostSendJobs()
  scenario and only prohibits insane call patterns. Failing early avoids
  the risk of handleUpdateQueue() dropping all the updates due to the same
  DBTransactionError error in DeferredUpdates::attemptUpdate().
* Avoid recursion loop in tryOpportunisticExecute() when JobQueueDB is in
  use and a large number of tasks are pending. This happened due to methods
  like onTransactionPreCommitOrIdle() being used within JobQueueDB.

Mark DeferredUpdates::doUpdates()/tryOpportunisticExecute() as @internal
and create a Maintenance::shutdown() method to avoid a direct call in the
doMaintenance.php file.

Bug: T249069
Bug: T268840
Change-Id: Ib369f0e74243a48ababdb9cd83b155c9a0f5e741
2021-01-14 15:37:58 -08:00
.phan build: Enable SecurityCheck-DoubleEscaped and suppress issues 2020-12-30 23:34:20 +00:00
.pipeline pipeline: Increase fetch depth to 50 2020-12-18 15:59:02 -08:00
cache
docs Merge "Add db group documentation" 2020-12-09 23:41:21 +00:00
extensions vscode live share settings 2020-07-07 15:31:17 +00:00
images Remove IE 6 security features from server-side code 2019-11-28 15:11:56 +11:00
includes deferred: make DeferredUpdates::doUpdates() recursion more uniform 2021-01-14 15:37:58 -08:00
languages Localisation updates from https://translatewiki.net. 2021-01-07 08:30:23 +01:00
maintenance deferred: make DeferredUpdates::doUpdates() recursion more uniform 2021-01-14 15:37:58 -08:00
mw-config Merge "installer: Add overflow:hidden to help box" 2020-05-28 20:36:41 +00:00
resources Merge "Revert "Provide native support to dismiss sitenotice in core."" 2021-01-07 00:09:20 +00:00
skins vscode live share settings 2020-07-07 15:31:17 +00:00
tests deferred: make DeferredUpdates::doUpdates() recursion more uniform 2021-01-14 15:37:58 -08:00
.dockerignore Fix a typo in .dockerignore 2020-12-05 10:15:14 +01:00
.editorconfig Set .editorconfig to use spaces instead of tabs on YAML files 2020-05-25 17:56:59 -04:00
.eslintignore build: Move eslint ignores to .eslintignore 2020-04-22 19:17:08 +01:00
.eslintrc.json build: Updating npm dependencies 2021-01-03 15:27:57 -08:00
.fresnel.yml build: Set Fresnel scenario run count to 7 2019-04-13 00:38:13 +01:00
.gitattributes Remove package-lock.json from the tarball 2020-08-07 23:10:26 -07:00
.gitignore Kill tests/phan 2020-11-17 16:04:33 +01:00
.gitreview
.mailmap Fix duplicate CREDITS entries I accidently added 2020-07-11 14:27:02 +03:00
.phpcs.xml Upgrade doctrine/dbal from 2.10.4 to 3.0.0 for PHP 8.0 support 2020-12-23 02:24:31 +00:00
.stylelintrc.json stylelintrc.json: Remove unused pattern 2020-12-29 14:19:43 +01:00
.travis.yml build: Force composer 1.x in Travis CI 2020-11-14 23:35:45 +00:00
.vsls.json vscode live share settings 2020-07-07 15:31:17 +00:00
api.php docs: Improve entry point documentation 2020-07-02 02:07:25 +00:00
autoload.php deferred: make DeferredUpdates::doUpdates() recursion more uniform 2021-01-14 15:37:58 -08:00
CODE_OF_CONDUCT.md docs: Exclude extra markdown files from Doxygen 2019-09-13 16:35:49 +00:00
composer.json build: Updating npm dependencies 2021-01-03 15:27:57 -08:00
composer.local.json-sample
COPYING
CREDITS Update CREDITS 2020-09-28 12:53:22 +00:00
DEVELOPERS.md [docker] Update developer docs for /w script path 2020-10-06 10:56:18 +02:00
docker-compose.yml [docker] Use image that anchors MW_SCRIPT_PATH regex 2020-11-18 11:49:31 -07:00
FAQ
Gruntfile.js Update stylelint-config-wikimedia to 0.10.3 2020-11-19 23:13:37 +00:00
HISTORY Add 1.31.11, 1.31.12, 1.35.1 to HISTORY 2020-12-18 03:24:54 +00:00
img_auth.php SECURITY: Fix accidental public CC headers in img_auth.php 2020-06-24 17:58:39 +01:00
index.php docs: Improve entry point documentation 2020-07-02 02:07:25 +00:00
INSTALL composer.json: Add ext-libxml and ext-xmlreader to requires 2020-12-27 22:01:02 +00:00
jsduck.json Update OOUI to v0.39.2 2020-06-24 15:22:57 +01:00
load.php docs: Improve entry point documentation 2020-07-02 02:07:25 +00:00
opensearch_desc.php In Web entry points, move file scope code into a main function 2020-06-25 11:31:45 +01:00
package-lock.json build: Updating npm dependencies 2021-01-03 15:27:57 -08:00
package.json build: Updating npm dependencies 2021-01-03 15:27:57 -08:00
phpunit.xml.dist phpunit: fail on warnings 2020-09-09 20:19:52 +02:00
README.md docs: Rename main README to README.md 2020-06-23 15:50:57 +01:00
RELEASE-NOTES-1.36 CoreTagHooks: First argument passed to parser tags can be null 2021-01-05 14:19:44 -05:00
rest.php Add MW_REST_API and MW_ENTRY_POINT 2019-09-03 11:43:18 +10:00
SECURITY
thumb.php thumb.php - wfExtractThumbParams can return null 2020-12-17 06:22:46 +00:00
thumb_handler.php docs: Improve entry point documentation 2020-07-02 02:07:25 +00:00
UPGRADE UPGRADE: Remove non-existent messages from 1.3 or earlier section 2020-06-01 05:20:09 +00:00

MediaWiki

MediaWiki is a free and open-source wiki software package written in PHP. It serves as the platform for Wikipedia and the other Wikimedia projects, used by hundreds of millions of people each month. MediaWiki is localised in over 350 languages and its reliability and robust feature set have earned it a large and vibrant community of third-party users and developers.

MediaWiki is:

  • feature-rich and extensible, both on-wiki and with hundreds of extensions;
  • scalable and suitable for both small and large sites;
  • simple to install, working on most hardware/software combinations; and
  • available in your language.

For system requirements, installation, and upgrade details, see the files RELEASE-NOTES, INSTALL, and UPGRADE.

MediaWiki is the result of global collaboration and cooperation. The CREDITS file lists technical contributors to the project. The COPYING file explains MediaWiki's copyright and license (GNU General Public License, version 2 or later). Many thanks to the Wikimedia community for testing and suggestions.