Several special pages and actions call PermissionManager::isBlockedFrom directly, without specifying whether to use the primary or replica database, and therefore defaulting to primary. When executing actions via a POST request, this is the correct thing to do, but when simply loading the UI via a GET request, the replicas should be checked instead.
At the time of writing, about 25,000 warnings were logged in the last 24 hours satisfying the following filters:
- normalized_message.keyword: Expectation (masterConns <=) 0 by MediaWiki::main not met (actual: {actual}): {query}
- http_method: GET
- exception.trace: MediaWiki\Permissions\PermissionManager->isBlockedFrom
They are all accounted for by the following:
- SpecialRevisionDelete::execute
- SpecialEditTags::execute
- NewEntitySchema::checkBlocked (EntitySchema extension)
- SpecialMergeLexemes::checkBlocked (WikibaseLexeme extension)
- Action::checkCanExecute
- EditPage::showIntro
- Article::showMissingArticle
- AbstractRestoreAction::checkPermissions (EntitySchema extension)
These are also the only sources of similar warnings for the last month.