Lucas_Werkmeister_WMDE added a subscriber: Ladsgroup. Lucas_Werkmeister_WMDE added a comment.
This `SqlStore::rebuild()` method seems to date back to 2012 <https://gerrit.wikimedia.org/r/21328>, with relatively little substantial changes since then. Apart from one test, it’s only called in `DatabaseSchemaUpdater::doSchemaUpdate()`, when updating from older database schemas. My guess is that the method is really meant to “rebuild the entity store”; maybe we used to register deferred edit updates to migrate stored revisions to a new serialization schema, and calling `doEditUpdates()` in this `rebuild()` method was meant to do the same thing for all pages, even if they hadn’t received an edit lately (and therefore didn’t get a deferred edit update through the normal route). It’s worth noting that, as far as I’m aware, Wikibase hasn’t actually been updating old revisions for a long time now; instead, Wikibase can parse old serialization formats for the purpose of reading old revisions (but will only write new revisions with the latest serialization format). Also, `SqlStore::rebuild()` will only actually rebuild the first 1000 pages (“TODO: continuation”), so it would only do the right thing when upgrading very old Wikibases that are also very small (because, no matter whether the `rebuild()` touched all pages or only some of them, the rest of `DatabaseSchemaUpdater::doSchemaUpdate()` will have run already, and so the next database updates will no longer end up calling `rebuild()`). @Ladsgroup might have something to add because he also looked at related code recently (that same Gerrit change also caused T249565 <https://phabricator.wikimedia.org/T249565>, I believe). TASK DETAIL https://phabricator.wikimedia.org/T249563 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Ladsgroup, Addshore, Lucas_Werkmeister_WMDE, Aklapper, DannyS712, eprodromou, darthmon_wmde, Nandana, lucamauri, Amorymeltzer, Lahi, Gq86, GoranSMilovanovic, Jayprakash12345, QZanden, LawExplorer, _jensen, rosalieper, Agabi10, Scott_WUaS, Pchelolo, Izno, Wikidata-bugs, aude, Dinoguy1000, Jdforrester-WMF, Mbch331, Jay8g
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs