Last modified: 2014-04-14 17:01:24 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T64091, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62091 - MediaWiki::RestInPeace not called if exception thrown, including ErrorPageError subclasses, resulting in db writes being thrown away
MediaWiki::RestInPeace not called if exception thrown, including ErrorPageErr...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.23.0
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-01 04:40 UTC by Bawolff (Brian Wolff)
Modified: 2014-04-14 17:01 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bawolff (Brian Wolff) 2014-03-01 04:40:39 UTC
I noticed I was getting "Notice: Uncommitted DB writes (transaction from DatabaseBase::query (TranslatablePage::getTranslatablePages)). in /var/www/w/git/includes/db/Database.php on line 4118" when viewing Special:Preferences (locally) when not logged in.

Steps to reproduce:
*Have DBO_TRX or DBO_DEFAULT (assuming from web request) on. [This is default]
*Do some write query not currently in a transaction, so it gets an automatic transaction
*Later on, throw an exception such as: throw new UserNotLoggedIn();

Expected behaviour:
*Automatic transaction gets committed at end of requestion (e.g. MediaWiki::restInPeace() calls $factory->commitMasterChanges();).

Actual behaviour:
*Request ends without doing the load balancer shutdown stuff. As a result, the current (implicit) transaction is lost.

The actual behaviour (throwing away the transaction) may make sense for normal exceptions, but for error page exceptions I don't think it does, especially when the transaction is implicit instead of explicit.

[Probably not a super problematic bug, since exception error pages tend to only write caching related things to the db, if they write anything at all, but it does seem incorrect behaviour with the potential for subtle bugs]
Comment 1 Gerrit Notification Bot 2014-03-03 21:13:16 UTC
Change 116625 had a related patch set uploaded by Aaron Schulz:
Commit DB changes as normal on exception-based GUI errors

https://gerrit.wikimedia.org/r/116625
Comment 2 Gerrit Notification Bot 2014-04-11 14:58:32 UTC
Change 116625 had a related patch set uploaded by Anomie:
Commit DB changes as normal on exception-based GUI errors

https://gerrit.wikimedia.org/r/116625
Comment 3 Gerrit Notification Bot 2014-04-14 16:56:29 UTC
Change 116625 merged by jenkins-bot:
Commit DB changes as normal on exception-based GUI errors

https://gerrit.wikimedia.org/r/116625
Comment 4 Aaron Schulz 2014-04-14 17:01:24 UTC
Fixed in https://gerrit.wikimedia.org/r/#/c/121402/.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links