Page MenuHomePhabricator

PHP Warning: [data-update-failed]: Fail-safe exception. Number of ids to be restored is not equal to the number of records that are about to be inserted into master.….) [Called from Wikibase/repo/includes/Content/DataUpdateAdapter.php]
Closed, DuplicatePublic

Description

Error

MediaWiki version: 1.35.0-wmf.5

message
PHP Warning: [data-update-failed]: A data update callback triggered an exception (Fail-safe exception. Number of ids to be restored is not equal to the number of records that are about to be inserted into master. This should never happen, except for an edge-case that was not detected during development or due to a race-condition that is not covered by this implementation.) [Called from Wikibase\Repo\Content\DataUpdateAdapter::doUpdate in /srv/mediawiki/php-1.35.0-wmf.5/extensions/Wikibase/repo/includes/Content/DataUpdateAdapter.php at line 62]

Impact

Notes

These are very likely happen because we catch DBErrors which is "extremely discouraged" and can cause transaction inconsistencies and all sorts of issues.

Details

Request ID
XcVO9ApAAEAAACgJJasAAAAB
Request URL
https://www.wikidata.org/wiki/Special:MergeItems
Stack Trace
exception.trace
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.35.0-wmf.5/includes/debug/MWDebug.php(333): trigger_error(string, integer)
#2 /srv/mediawiki/php-1.35.0-wmf.5/includes/debug/MWDebug.php(188): MWDebug::sendMessage(string, array, string, integer)
#3 /srv/mediawiki/php-1.35.0-wmf.5/includes/GlobalFunctions.php(1079): MWDebug::warning(string, integer, integer, string)
#4 /srv/mediawiki/php-1.35.0-wmf.5/extensions/Wikibase/lib/includes/Reporting/LogWarningExceptionHandler.php(28): wfLogWarning(string, integer)
#5 /srv/mediawiki/php-1.35.0-wmf.5/extensions/Wikibase/repo/includes/Content/DataUpdateAdapter.php(62): Wikibase\Lib\Reporting\LogWarningExceptionHandler->handleException(Exception, string, string)
#6 /srv/mediawiki/php-1.35.0-wmf.5/includes/deferred/DeferredUpdates.php(385): Wikibase\Repo\Content\DataUpdateAdapter->doUpdate()
#7 /srv/mediawiki/php-1.35.0-wmf.5/includes/Storage/DerivedPageDataUpdater.php(1630): DeferredUpdates::attemptUpdate(Wikibase\Repo\Content\DataUpdateAdapter, Wikimedia\Rdbms\LBFactoryMulti)
#8 /srv/mediawiki/php-1.35.0-wmf.5/includes/Storage/DerivedPageDataUpdater.php(1446): MediaWiki\Storage\DerivedPageDataUpdater->doSecondaryDataUpdates(array)
#9 /srv/mediawiki/php-1.35.0-wmf.5/includes/deferred/MWCallableUpdate.php(38): MediaWiki\Storage\DerivedPageDataUpdater->MediaWiki\Storage\{closure}()
#10 /srv/mediawiki/php-1.35.0-wmf.5/includes/deferred/DeferredUpdates.php(385): MWCallableUpdate->doUpdate()
#11 /srv/mediawiki/php-1.35.0-wmf.5/includes/deferred/DeferredUpdates.php(283): DeferredUpdates::attemptUpdate(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti)
#12 /srv/mediawiki/php-1.35.0-wmf.5/includes/deferred/DeferredUpdates.php(228): DeferredUpdates::run(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti, Monolog\Logger, BufferingStatsdDataFactory, string)
#13 /srv/mediawiki/php-1.35.0-wmf.5/includes/deferred/DeferredUpdates.php(150): DeferredUpdates::handleUpdateQueue(array, string, integer)
#14 /srv/mediawiki/php-1.35.0-wmf.5/includes/MediaWiki.php(1053): DeferredUpdates::doUpdates(string)
#15 /srv/mediawiki/php-1.35.0-wmf.5/includes/MediaWiki.php(833): MediaWiki->restInPeace()
#16 /srv/mediawiki/php-1.35.0-wmf.5/includes/MediaWiki.php(842): MediaWiki->{closure}()
#17 /srv/mediawiki/php-1.35.0-wmf.5/includes/MediaWiki.php(569): MediaWiki->doPostOutputShutdown()
#18 /srv/mediawiki/php-1.35.0-wmf.5/index.php(46): MediaWiki->run()
#19 /srv/mediawiki/w/index.php(3): require(string)
#20 {main}

Event Timeline

Restricted Application added a project: Wikidata. · View Herald TranscriptNov 8 2019, 11:47 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

No sure how catching DBError could lead to these exceptions yet. I just removed the only place where we do that (mistakenly apparently) in a sub-task, but cannot think of a way to test that it does really solve this issue.

Krinkle renamed this task from PHP Warning: [data-update-failed]: A data update callback triggered an exception (Fail-safe exception. Number of ids to be restored is not equal to the number of records that are about to be inserted into master. This should never happen, except for an edge-case that was not detected during development or due to a race-condition that is not covered by this implementation.) [Called from Wikibase\Repo\Content\DataUpdateAdapter::doUpdate in /srv/mediawiki/php-1.35.0-wmf.5/extensions/Wikibase/repo/includes/Content/DataUpdateAdapter.php at line 62] to PHP Warning: [data-update-failed]: Fail-safe exception. Number of ids to be restored is not equal to the number of records that are about to be inserted into master.….) [Called from Wikibase/repo/includes/Content/DataUpdateAdapter.php].Nov 24 2019, 3:18 AM