Page MenuHomePhabricator

Need interface for diff-based DataUpdates in WIkiPage::doEdit
Open, LowPublic

Description

As of recently, DataUpdate objects are used to represent updates to be performed on the database when a page is changed or deleted (basically, DataUpdate is a generalization of LinksUpdate).

Currently, WikiPage::doEdit takes a list of DataUpdate objects from the ParserOutput object and applies them to the database. However, the DataUpdate could be implemented more smartly if the difference between the previous and the new revision could be used,m instead of relying solely on the new revision.

So, WikiPage::doEdit should call a function that can generate DataUpdate objects based on the (difference between) the previous and the new revision, and apply them to the database.

Conceptually, WikiPage::doEdit should have a way to determine which DataUpdates need to be performed for the current edit, instead of relying on the UpdateObjects from the ParserOutput directly.


Version: unspecified
Severity: minor

Details

Reference
bz36898

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:27 AM
bzimport set Reference to bz36898.
bzimport added a subscriber: Unknown Object (MLST).

An alternative place to implement diff-based updates would be the update of the recentchanges table.

Would it be feasible to even do the update to the recentchanges table in the same transaction (list of DataUpdates) as the update to links tables?

Context: this is needed to feed the global/shared change-tracking table for the Wikibase extension that will run the Wikidata project.

[replacing wikidata keyword by adding CC - see bug 56417]