Page MenuHomePhabricator

DatabaseUpdater should not call hooks in the constructor
Closed, DuplicatePublic

Description

DatabaseUpdater modifies global variables and executes hooks in the constructor. This can be dangerous, see the major outage cause by T157651.

The initialization currently done in DatabaseUpdater's constructor should be done later, in doUpdates() or a separate initialization method.

Event Timeline

Change 587223 had a related patch set uploaded (by Daniel Kinzler; owner: Daniel Kinzler):
[mediawiki/core@master] DatabaseUpdater: don't call hook in constructor

https://gerrit.wikimedia.org/r/587223

daniel renamed this task from DatabaseUpdater should not do work in the constructor to DatabaseUpdater should not call hooks in the constructor.Apr 7 2020, 10:19 AM
daniel triaged this task as High priority.

Change 587223 had a related patch set uploaded (by Daniel Kinzler; owner: Daniel Kinzler):
[mediawiki/core@master] DatabaseUpdater: don't call hook in constructor

https://gerrit.wikimedia.org/r/587223