Help:Deferred updates


Semantic MediaWiki 2.4.0Released on 9 July 2016 and compatible with MW 1.19.0 - 1.27.x. introduces DeferredCallableUpdate1 to conform with MediaWiki's Phabricator task "T92357"2 which together with configuration parameter $smwgEnabledDeferredUpdateSets whether updates to pages are queued and executed after edits is responsible that most updates are being pushed into the deferred update queue provided by MediaWiki's DeferredUpdates class to avoid racing conditions and conflicts with the WikiPage::doEdit and LinksUpdate processes.

DeferredUpdates::doUpdates are executed during the MediaWiki::restInPeace at a point of "... at the end of the request, either before or after the HTTP response has been sent. In either case, they run after the DB commit step ...".3


Does that mean that it will be impossible to set/update and query updated property value on the same page (e.g. when you update page properties via form and have #ask query at bottom)?4

It will not mean that updates are impossible, it means it requires other processes (mainly MediaWikis's edit save process) to be finished first therefore it is important that third-party extensions that wish to store additional data (e.g. extension "Semantic Extra Special Properties"Adds some extra special properties to all pages) are using the official hooks to ensure that data are processed in accordance to the deferred update plan.

Self-reference queries (those that query an entity using the "page name" {{PAGENAME}} as condition) were not guaranteed5 to be updated visually on the same save event and that remains so whether deferred updates are used or not.


  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:1435
  2. ^  Semantic MediaWiki: Phabricator task phab:mw:T92357
  3. ^  MediaWiki: Source code quote for "DeferredUpdates.php"
  4. ^  MediaWiki: "mediawiki-l" mailing list thread "Semantic MediaWiki 2.4 - first release candidate"
  5. ^  Semantic MediaWiki: GitHub issue comment gh:smw:1478:202170690