Page MenuHomePhabricator

GrowthExperiments\Maintenance\RefreshLinkRecommendations: no transaction to commit, something got out of sync
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.35

message
GrowthExperiments\Maintenance\RefreshLinkRecommendations::execute: no transaction to commit, something got out of sync
Notes

The error (total count: 60 when the task is file) is exclusively on testwiki.

Details

Request URL
n/a
Stack Trace
exception.trace
from /srv/mediawiki/php-1.36.0-wmf.35/includes/libs/rdbms/database/Database.php(4618)
#0 /srv/mediawiki/php-1.36.0-wmf.35/includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database->commit(string)
#1 /srv/mediawiki/php-1.36.0-wmf.35/includes/libs/rdbms/database/DBConnRef.php(649): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#2 /srv/mediawiki/php-1.36.0-wmf.35/maintenance/includes/Maintenance.php(1435): Wikimedia\Rdbms\DBConnRef->commit(string)
#3 /srv/mediawiki/php-1.36.0-wmf.35/extensions/GrowthExperiments/maintenance/refreshLinkRecommendations.php(197): Maintenance->commitTransaction(Wikimedia\Rdbms\DBConnRef, string)
#4 /srv/mediawiki/php-1.36.0-wmf.35/maintenance/doMaintenance.php(112): GrowthExperiments\Maintenance\RefreshLinkRecommendations->execute()
#5 /srv/mediawiki/php-1.36.0-wmf.35/extensions/GrowthExperiments/maintenance/refreshLinkRecommendations.php(486): require_once(string)
#6 /srv/mediawiki/multiversion/MWScript.php(101): require_once(string)
#7 {main}

Event Timeline

Change 673150 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/GrowthExperiments@master] Fix "no transaction to commit" logspam

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

Probably not worth a backport, but will let @Tgr decide.

Change 673150 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Fix "no transaction to commit" logspam

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

Agreed. It's just logspam and not a huge amount of it.

The error is not present anymore in wmf.36.

Change 677609 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] refreshLinkRecommendations.php: use explicit begin

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

I'm confused how these were resolved given that https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/677609 wasn't merged/deployed. @Tgr is your patch still needed?

The error is still present, so some kind of fix is still needed. I'm hoping using an explicit transaction will fix it, although I still don't understand why the previous fix did not work.

Change 677609 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] refreshLinkRecommendations.php: use explicit begin

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

Checked in wmf.3 - the error is not present.