Page MenuHomePhabricator

Expectation (writes <= 0) by MediaWiki\MediaWikiEntryPoint::restInPeace not met (actual: {actualSeconds}):{query}
Closed, DeclinedPublicPRODUCTION ERROR

Description

Error
normalized_message
Expectation (writes <= 0) by MediaWiki\MediaWikiEntryPoint::restInPeace not met (actual: {actualSeconds}):
{query}
exception.trace
from /srv/mediawiki/php-1.43.0-wmf.22/includes/libs/rdbms/TransactionProfiler.php(534)
#0 /srv/mediawiki/php-1.43.0-wmf.22/includes/libs/rdbms/TransactionProfiler.php(335): Wikimedia\Rdbms\TransactionProfiler->reportExpectationViolated(string, Wikimedia\Rdbms\Query, int, string, string)
#1 /srv/mediawiki/php-1.43.0-wmf.22/includes/libs/rdbms/database/TransactionManager.php(593): Wikimedia\Rdbms\TransactionProfiler->recordQueryCompletion(Wikimedia\Rdbms\Query, float, bool, int, string, string)
#2 /srv/mediawiki/php-1.43.0-wmf.22/includes/libs/rdbms/database/Database.php(822): Wikimedia\Rdbms\TransactionManager->recordQueryCompletion(Wikimedia\Rdbms\Query, float, bool, int, string)
#3 /srv/mediawiki/php-1.43.0-wmf.22/includes/libs/rdbms/database/Database.php(707): Wikimedia\Rdbms\Database->attemptQuery(Wikimedia\Rdbms\Query, string, bool)
#4 /srv/mediawiki/php-1.43.0-wmf.22/includes/libs/rdbms/database/Database.php(634): Wikimedia\Rdbms\Database->executeQuery(Wikimedia\Rdbms\Query, string, int)
#5 /srv/mediawiki/php-1.43.0-wmf.22/includes/libs/rdbms/database/Database.php(1471): Wikimedia\Rdbms\Database->query(Wikimedia\Rdbms\Query, string)
#6 /srv/mediawiki/php-1.43.0-wmf.22/includes/libs/rdbms/database/DBConnRef.php(127): Wikimedia\Rdbms\Database->insert(string, array, string, array)
#7 /srv/mediawiki/php-1.43.0-wmf.22/includes/libs/rdbms/database/DBConnRef.php(407): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#8 /srv/mediawiki/php-1.43.0-wmf.22/includes/libs/rdbms/querybuilder/InsertQueryBuilder.php(343): Wikimedia\Rdbms\DBConnRef->insert(string, array, string, array)
#9 /srv/mediawiki/php-1.43.0-wmf.22/extensions/CheckUser/src/Services/CheckUserCentralIndexManager.php(272): Wikimedia\Rdbms\InsertQueryBuilder->execute()
#10 /srv/mediawiki/php-1.43.0-wmf.22/extensions/CheckUser/src/Services/CheckUserCentralIndexManager.php(97): MediaWiki\CheckUser\Services\CheckUserCentralIndexManager->getWikiMapIdForDomainId(string)
#11 /srv/mediawiki/php-1.43.0-wmf.22/extensions/CheckUser/src/Services/CheckUserInsert.php(194): MediaWiki\CheckUser\Services\CheckUserCentralIndexManager->recordActionInCentralIndexes(MediaWiki\User\User, string, string, string, bool)
#12 /srv/mediawiki/php-1.43.0-wmf.22/includes/deferred/MWCallableUpdate.php(52): MediaWiki\CheckUser\Services\CheckUserInsert->MediaWiki\CheckUser\Services\{closure}(string)
#13 /srv/mediawiki/php-1.43.0-wmf.22/includes/deferred/DeferredUpdates.php(460): MediaWiki\Deferred\MWCallableUpdate->doUpdate()
#14 /srv/mediawiki/php-1.43.0-wmf.22/includes/deferred/DeferredUpdates.php(204): MediaWiki\Deferred\DeferredUpdates::attemptUpdate(MediaWiki\Deferred\MWCallableUpdate)
#15 /srv/mediawiki/php-1.43.0-wmf.22/includes/deferred/DeferredUpdates.php(291): MediaWiki\Deferred\DeferredUpdates::run(MediaWiki\Deferred\MWCallableUpdate)
#16 /srv/mediawiki/php-1.43.0-wmf.22/includes/deferred/DeferredUpdatesScope.php(243): MediaWiki\Deferred\DeferredUpdates::MediaWiki\Deferred\{closure}(MediaWiki\Deferred\MWCallableUpdate, int)
#17 /srv/mediawiki/php-1.43.0-wmf.22/includes/deferred/DeferredUpdatesScope.php(172): MediaWiki\Deferred\DeferredUpdatesScope->processStageQueue(int, int, Closure)
#18 /srv/mediawiki/php-1.43.0-wmf.22/includes/deferred/DeferredUpdates.php(310): MediaWiki\Deferred\DeferredUpdatesScope->processUpdates(int, Closure)
#19 /srv/mediawiki/php-1.43.0-wmf.22/includes/MediaWikiEntryPoint.php(674): MediaWiki\Deferred\DeferredUpdates::doUpdates()
#20 /srv/mediawiki/php-1.43.0-wmf.22/includes/MediaWikiEntryPoint.php(496): MediaWiki\MediaWikiEntryPoint->restInPeace()
#21 /srv/mediawiki/php-1.43.0-wmf.22/includes/MediaWikiEntryPoint.php(454): MediaWiki\MediaWikiEntryPoint->doPostOutputShutdown()
#22 /srv/mediawiki/php-1.43.0-wmf.22/includes/MediaWikiEntryPoint.php(209): MediaWiki\MediaWikiEntryPoint->postOutputShutdown()
#23 /srv/mediawiki/php-1.43.0-wmf.22/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#24 /srv/mediawiki/w/index.php(3): require(string)
#25 {main}
Impact
Notes

Write in a deferred update on GET, presumably needs to be created as a job.

There's also a complain from TransactionProfiler about Expectation (masterConns <= 0) by MediaWiki\MediaWikiEntryPoint::restInPeace not met (actual: {actualSeconds}): {query}

Details

Request URL
https://dty.wikipedia.org/wiki/%E0%A4%A8%E0%A5%87%E0%A4%AA%E0%A4%BE%E0%A4%B2%E0%A4%95%E0%A5%8B_%E0%A4%B8%E0%A4%82%E0%A4%B5%E0%A4%BF%E0%A4%A7%E0%A4%BE%E0%A4%A8_%E0%A5%A8%E0%A5%A6%E0%A5%AD%E0%A5%A8

Event Timeline

The specific instance of CheckUser violating the condition should be no longer present on production wikis once all wikis have a new entry in their CheckUser tables added.

The reason this is occurring is that the code acquiring the cuci_wiki_map row ID finds no ID and inserts one.

We may still want to fix this so that when new wikis are created / third-party wikis use this, they don't violate transaction profiler warnings.

Using a job is probably not possible, because we insert to cuci_temp_edit not in a job. Furthermore, the job to insert to cuci_user uses the row ID from cuci_wiki_map to de-duplicate the jobs and as a parameter, so is currently needed before the job is executed.

The specific instance of CheckUser violating the condition should be no longer present on production wikis once all wikis have a new entry in their CheckUser tables added.

The reason this is occurring is that the code acquiring the cuci_wiki_map row ID finds no ID and inserts one.

We may still want to fix this so that when new wikis are created / third-party wikis use this, they don't violate transaction profiler warnings.

Using a job is probably not possible, because we insert to cuci_temp_edit not in a job. As such, we need to have the cuci_wiki_map row before we start running the job for the temp edit table. Furthermore, the job to insert to cuci_user uses the row ID from cuci_wiki_map to de-duplicate the jobs and as a parameter, so is currently needed before the job is executed.

Thanks for the explanation. I'd propose that we don't do anything about this task, then, as we expect the error message to go away.