Page MenuHomePhabricator

Transaction of DatabaseUpdater may get out of sync when populate script does own transaction handling
Closed, ResolvedPublic

Description

Seen the following while running an update.php

Notice: PopulateLogUsertext::doDBUpdates: Transaction already in progress (from DatabaseUpdater::doUpdates), performing implicit commit! [Called from DatabaseBase::begin in \includes\db\Database.php at line 3592] in \includes\debug\MWDebug.php on line 300

The problem here is that the DatabaseUpdater starts a transaction before running all the changes, but the maintenance script populateLogUserText.php also has begin/commit in it.

I am not sure if it is okay to just remove the begin/commit because when running the script standalone that does not make problems.

Event Timeline

Umherirrender raised the priority of this task from to Needs Triage.
Umherirrender updated the task description. (Show Details)
Umherirrender subscribed.
Aklapper triaged this task as Medium priority.Feb 13 2015, 3:38 PM

I ran into this same issue trying to install Extension:PageAssessments. This was within vagrant, where I first ran php update.php, then once it errored out I realized I should have ran mwscript update.php. I tried that and it also failed with the same error. I also had Extension:Gadgets installed, but otherwise my vagrant was in a fresh, untouched state.

Hope this helps.

bd808 subscribed.

The error @MusikAnimal saw is

DBUnexpectedError from line 2592 of /vagrant/mediawiki/includes/db/Database.php: PopulateLogUsertext::doDBUpdates: Transaction already in progress (from DatabaseUpdater::doUpdates),  performing implicit commit!

I finally had success by killing and rebuilding vagrant, then vagrant git-update before installing any extensions.

Change 298183 had a related patch set uploaded (by Aaron Schulz):
Unbreak the DB updater by removing transaction from doUpdates()

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

Change 298183 merged by jenkins-bot:
Unbreak the DB updater by removing transaction from doUpdates()

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

Umherirrender assigned this task to aaron.