Deferred updates

From semantic-mediawiki.org
Jump to: navigation, search

Semantic MediaWiki 2.4.0 introduces DeferredCallableUpdate1 to conform with phab:T923572 which together with the smwgEnabledDeferredUpdate setting 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 process.

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

FAQ

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. SESP) 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.