Page MenuHomePhabricator

Expected mass commit of all peer transactions in TemporaryTableManager::queryWithAutoCommit:
Closed, ResolvedPublic

Description

Getting the following error with SemanticDrilldown:

[W6FDpJPeJIBry9XygC2qvAAAAAA] /iss/index.php/Special:BrowseData/MSS_Database?_single&requestDebug=true Wikimedia\Rdbms\DBUnexpectedError from line 3769 of /opt/htdocs/mediawiki/includes/libs/rdbms/database/Database.php: TemporaryTableManager::queryWithAutoCommit: Expected mass commit of all peer transactions (DBO_TRX set).

Backtrace:

#0 /opt/htdocs/mediawiki/extensions/SemanticDrilldown/includes/TemporaryTableManager.php(31): Wikimedia\Rdbms\Database->commit(string)
#1 /opt/htdocs/mediawiki/extensions/SemanticDrilldown/specials/SD_BrowseData.php(230): TemporaryTableManager->queryWithAutoCommit(string, string)
#2 /opt/htdocs/mediawiki/extensions/SemanticDrilldown/specials/SD_BrowseData.php(1150): SDBrowseDataPage->createTempTable(string, NULL, array, array)
#3 /opt/htdocs/mediawiki/includes/specialpage/QueryPage.php(642): SDBrowseDataPage->getPageHeader()
#4 /opt/htdocs/mediawiki/extensions/SemanticDrilldown/specials/SD_BrowseData.php(129): QueryPage->execute(string)
#5 /opt/htdocs/mediawiki/includes/specialpage/SpecialPage.php(522): SDBrowseData->execute(string)
#6 /opt/htdocs/mediawiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(string)
#7 /opt/htdocs/mediawiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
#8 /opt/htdocs/mediawiki/includes/MediaWiki.php(861): MediaWiki->performRequest()
#9 /opt/htdocs/mediawiki/includes/MediaWiki.php(524): MediaWiki->main()
#10 /opt/htdocs/mediawiki/index.php(42): MediaWiki->run()
#11 {main}

Environment:

  • MediaWiki 1.31.0 (5cfc9ac)
  • PHP 7.0.31
  • MariaDB 5.5.60
  • SMW 2.5.6 (same error in SMW 3.0.0-alpha (e4b81fd))
  • SemanticDrilldown REL1_31 branch (2252e92)

Event Timeline

I think this might be a result of https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/417477/ updating some transaction related warnings to exceptions. Need to take a look at what's going on there.

In this situation it should be safe to set explicitly the IDatabase::FLUSHING_ALL_PEERS flag since we want to commit any open implicit transaction.

This is linked to T174908 and it probably fixed with recent versions of SemanticDrilldown with b4d8b42 included (current master, future 2.2), isn’t it @TK-999 @Yaron_Koren ?

I assume the problem is fixed, but I haven't tested it...

Closing per last two comments. Please reopen if this is still an issue in recent supported versions - thanks!