Last modified: 2012-10-29 22:32:05 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 T42377, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40377 - Transaction warning: EditPage::commitWatch (SMWStore::updateData)
Transaction warning: EditPage::commitWatch (SMWStore::updateData)
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
master
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 39480
  Show dependency treegraph
 
Reported: 2012-09-20 05:54 UTC by Niklas Laxström
Modified: 2012-10-29 22:32 UTC (History)
5 users (show)

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


Attachments

Description Niklas Laxström 2012-09-20 05:54:12 UTC
PHP Notice:  EditPage::commitWatch: Transaction already in progress (from DatabaseBase::query (SMWStore::updateData)),  performing implicit commit! [Called from DatabaseBase::begin in /www/translatewiki.net/w/includes/db/Database.php at line 2888] in /www/translatewiki.net/w/includes/debug/Debug.php on line 282
Comment 1 Daniel Kinzler 2012-09-22 10:16:29 UTC
I suspect a bug in SMW is causing this, changing the component accordingly.
Comment 2 Niklas Laxström 2012-10-02 07:12:02 UTC
This is the remaining high-flood notice from the transaction debugging which is preventing us from restoring IRC relay.

Of last 1000 lines of error log there are 686 instances of this warning.
Comment 3 Daniel Kinzler 2012-10-02 09:34:21 UTC
If SMWStore::updateData calls EditPage::commitWatch from within a transaction, that needs to be fixed. I'm not familiar enough with SMW to have an opinion on how to best do this. I guess the new onTransactionIdle function in Database could help, ask Aaron about it.
Comment 4 Jeroen De Dauw 2012-10-02 15:58:14 UTC
I cannot find any occurrence of "commitWatch" in SMW on master.
Comment 5 Jeroen De Dauw 2012-10-02 16:08:08 UTC
Nike, can you provide a full stack trace?
Comment 6 Daniel Kinzler 2012-10-02 16:21:50 UTC
After looking through the code with jeroen, I guess what is happening is this:

SMWStore::updateData calls Database::update, which starts an automatic transaction (because of DBO_TRX) and marks it as having done write operations. Then, some time later, EditPage::commitWatch tries to explicitely starts a transaction, which triggers the warning.

It seems that the idea of warning about automatically committing transactions if they have done write operations does not solve our problem. We have to either disable the warnings completely if DBO_TRX is enabled, or at least disable them for implicit transactions that were started because of DBO_TRX. trxLevel = -1 could be used for that - a bit hackish, but should work.

Aaron, what do you think?
Comment 7 Aaron Schulz 2012-10-02 22:30:43 UTC
That would remove almost all of the value of the warnings. If there is no way to fix the too many transactions we can always but the warnings behind $wgDebugDBTransactions exclusively if nothing else. But I would like them to show up with "developer warnings" enabled if possble.

See https://gerrit.wikimedia.org/r/26409.
Comment 8 Jeroen De Dauw 2012-10-03 16:59:01 UTC
Aaron: I like the onTransactionIdle stuff you added, and it could be used here, if you introduced in MW 1.17 :) We'll have to wait a bit before we can require 1.20 (which isn't even released at this point).

Please do add @since tags to such new methods, I had to do a git blame and check the 1.19.0 rel.
Comment 9 Siebrand Mazeland 2012-10-03 21:13:23 UTC
This should be added in a BC way, because this is a must-have. Logs on twn are being swamped by this issue.
Comment 10 Jeroen De Dauw 2012-10-04 10:19:13 UTC
Siebrand: you can presumably get rid of the log issue by setting $smwgAutoRefreshSubject to false. Obviously this does not actually fix the warning issue though...
Comment 11 Aaron Schulz 2012-10-29 22:32:05 UTC
These notices have been fixed by now (in the trx warning saga).

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


Navigation
Links