Page MenuHomePhabricator

Frequent DB writes on HTTP GET from PageTriage
Closed, ResolvedPublic

Description

Expectation (writes <= 0) by MediaWiki::main not met:
query-m: REPLACE INTO `pagetriage_page_tags` (ptrpt_page_id,ptrpt_tag_id,ptrpt_value) VALUES ('X') [TRX#9f2762]
#0 /srv/mediawiki/php-1.29.0-wmf.5/includes/libs/rdbms/TransactionProfiler.php(215): TransactionProfiler->reportExpectationViolated()
#1 /srv/mediawiki/php-1.29.0-wmf.5/includes/libs/rdbms/database/Database.php(959): TransactionProfiler->recordQueryCompletion()
#2 /srv/mediawiki/php-1.29.0-wmf.5/includes/libs/rdbms/database/Database.php(870): Database->doProfiledQuery()
#3 /srv/mediawiki/php-1.29.0-wmf.5/includes/libs/rdbms/database/Database.php(2148): Database->query()
#4 /srv/mediawiki/php-1.29.0-wmf.5/includes/libs/rdbms/database/DatabaseMysqlBase.php(486): Database->nativeReplace()
#5 /srv/mediawiki/php-1.29.0-wmf.5/extensions/PageTriage/includes/ArticleMetadata.php(502): DatabaseMysqlBase->replace()
#6 /srv/mediawiki/php-1.29.0-wmf.5/extensions/PageTriage/includes/ArticleMetadata.php(393): ArticleCompileProcessor->save()
#7 /srv/mediawiki/php-1.29.0-wmf.5/extensions/PageTriage/includes/ArticleMetadata.php(180): ArticleCompileProcessor->compileMetadata()
#8 /srv/mediawiki/php-1.29.0-wmf.5/extensions/PageTriage/PageTriage.hooks.php(333): ArticleMetadata->getMetadata()
#9 /srv/mediawiki/php-1.29.0-wmf.5/extensions/PageTriage/PageTriage.hooks.php(313): PageTriageHooks::isArticleNew()
#10 /srv/mediawiki/php-1.29.0-wmf.5/extensions/PageTriage/PageTriage.hooks.php(378): PageTriageHooks::shouldShowNoIndex()
#11 /srv/mediawiki/php-1.29.0-wmf.5/includes/Hooks.php(195): PageTriageHooks::onArticleViewFooter()
#12 /srv/mediawiki/php-1.29.0-wmf.5/includes/page/Article.php(987): Hooks::run()
#13 /srv/mediawiki/php-1.29.0-wmf.5/includes/page/Article.php(706): Article->showViewFooter()
#14 /srv/mediawiki/php-1.29.0-wmf.5/includes/actions/ViewAction.php(71): Article->view()
#15 /srv/mediawiki/php-1.29.0-wmf.5/includes/MediaWiki.php(495): ViewAction->show()
#16 /srv/mediawiki/php-1.29.0-wmf.5/includes/MediaWiki.php(289): MediaWiki->performAction()
#17 /srv/mediawiki/php-1.29.0-wmf.5/includes/MediaWiki.php(851): MediaWiki->performRequest()
#18 /srv/mediawiki/php-1.29.0-wmf.5/includes/MediaWiki.php(512): MediaWiki->main()
#19 /srv/mediawiki/php-1.29.0-wmf.5/index.php(43): MediaWiki->run()
#20 /srv/mediawiki/w/index.php(3): include()
#21 {main}

Details

Related Gerrit Patches:
mediawiki/extensions/PageTriage : masterDefer secondary page metadata backfill DB writes

Event Timeline

aaron created this task.Dec 10 2016, 7:10 PM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptDec 10 2016, 7:10 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 326279 had a related patch set uploaded (by Aaron Schulz):
Defer secondary page metadata backfill DB writes

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

Catrope closed this task as Resolved.Dec 11 2016, 1:58 AM
Catrope claimed this task.

Change 326279 merged by jenkins-bot:
Defer secondary page metadata backfill DB writes

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

Catrope reassigned this task from Catrope to aaron.Dec 11 2016, 6:03 AM
Catrope added a subscriber: Catrope.
aaron added a comment.Dec 11 2016, 6:05 AM

According to a comment, this should be rare. I wonder if there is another bug present here.