Page MenuHomePhabricator

GlobalUserPage is tripping dbperformance.log because of User / CentralAuth cache misses
Closed, ResolvedPublic

Description

User.php line 375 calls User->loadFromDatabase()
User.php line 342 calls User->loadFromId()
User.php line 1937 calls User->load()
GlobalUserPage.body.php line 119 calls User->getId()
GlobalUserPage.hooks.php line 76 calls GlobalUserPage::shouldDisplayGlobalPage()
Hooks.php line 209 calls GlobalUserPageHooks::onTitleIsAlwaysKnown()
Title.php line 4264 calls Hooks::run()
Title.php line 4305 calls Title->isAlwaysKnown()
SkinTemplate.php line 700 calls Title->isKnown()

or

CentralAuthUser.php line 205 calls CentralAuthUser::getCentralDB()
CentralAuthUser.php line 403 calls CentralAuthUser->loadState()
CentralAuthUser.php line 461 calls CentralAuthUser->getId()
CentralAuthUser.php line 2780 calls CentralAuthUser->exists()
CentralAuthHooks.php line 1926 calls CentralAuthUser->attachedOn()
CentralAuthHooks.php line 1911 calls CentralAuthHooks::isUserTheSameOn()
Hooks.php line 209 calls CentralAuthHooks::onLoadGlobalUserPage()
GlobalFunctions.php line 4013 calls Hooks::run()
GlobalUserPage.body.php line 136 calls wfRunHooks()
GlobalUserPage.hooks.php line 76 calls GlobalUserPage::shouldDisplayGlobalPage()
Hooks.php line 209 calls GlobalUserPageHooks::onTitleIsAlwaysKnown()
Title.php line 4264 calls Hooks::run()
Title.php line 4305 calls Title->isAlwaysKnown()

Details

Related Gerrit Patches:
mediawiki/extensions/GlobalUserPage : masterAvoid master queries on parse due to User object loading

Event Timeline

Legoktm created this task.Mar 11 2015, 10:14 PM
Legoktm raised the priority of this task from to Needs Triage.
Legoktm updated the task description. (Show Details)
Legoktm added a project: GlobalUserPage.
Legoktm added subscribers: Legoktm, aaron.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 11 2015, 10:14 PM
[11:00:13] <autismcat> legoktm: ideally functions that get User objects for parsing, special pages lists, and most stuff could just use a slave (the cache could be checked thought not backfilled)
[11:00:35] <autismcat> for now, the main User for the request should keep the cache/master logic to avoid weirdness though

Change 199176 had a related patch set uploaded (by Aaron Schulz):
Avoid master queries on parse due to User object loading

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

Change 199176 merged by jenkins-bot:
Avoid master queries on parse due to User object loading

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

aaron closed this task as Resolved.Mar 19 2016, 12:39 AM
aaron claimed this task.

The few log backtraces left are on POSTs to articles treated with POST-nonwrite expectations (a separate small issue).