Page MenuHomePhabricator

"{{#ask:" fails with database error when querying categories with subcategories
Closed, DeclinedPublic

Description

https://wikitech.wikimedia.org/w/index.php?title=Incident_documentation&oldid=89337 yields "Database error: A database query error has occurred. This may indicate a bug in the software." The error log says: "PHP Notice: Uncommitted DB writes (transaction from DatabaseBase::query (WikiPage::pageData)). in /srv/org/wikimedia/controller/wikis/slot0/includes/db/Database.php on line 4104".

Bisecting shows that this started with the addition of "{{#ask: [[Category:Events reports]] | format=ul }}" to the page, but must have been worked in the past.

Playing around with some queries shows that #ask'ing for categories with only plain pages works (Category:Tools Access Requests), but for categories with subcategories (Category:Events reports, Category:Linode) fails.

Currently, wikitech is running 1.8.0.5.

"format=debug" says (not failing):

Debug Output by SMWSQLStore3
Generated Wiki-Query
[[Category:Events reports]]
Query Metrics
Query-Size:1
Query-Depth:0
SQL Query
SELECT DISTINCT t2.smw_title AS t,t2.smw_namespace AS ns FROM smw_object_ids AS t2 INNER JOIN smw_fpt_inst AS t0 ON t2.smw_id=t0.s_id INNER JOIN t1 AS t1 ON t0.o_id=t1.id ORDER BY t2.smw_sortkey ASC LIMIT 51 OFFSET 0;
Auxilliary Tables Used
Temporary table t1
Recursively computed hierarchy for element(s) ('3544').
Errors and Warnings
None

Version: unspecified
Severity: normal

Details

Reference
bz60274

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:51 AM
bzimport set Reference to bz60274.
bzimport added a subscriber: Unknown Object (MLST).

I have absolutely no clue how, but now it works again. Can "format=debug" clean up some internal SMW confusion?

Anyhow, closing this bug.

Can "format=debug" clean up some internal SMW confusion?

Unlikely this has anything to do with it in this case.

Looks like some kind of race condition. Hard to say more without a full stack trace.