Page MenuHomePhabricator

All LiquidTreads actions done twice
Closed, ResolvedPublic


Creating new threads, posting replies, even deleting.

In the error log I see

2013-01-07 10:57:16 mediawiki-bw_: [2c2f628f] /w/api.php Exception from line 2993 of /www/ LinkCache doesn't currently know about this title: Thread:User_talk:Nike/Test/reply_(3)
#0 /www/ Title->getLatestRevID()
#1 /www/ Title->invalidateCache()
#2 /www/ Thread->insert()
#3 /www/ Thread::create(Object(Article), Object(Article), Object(Thread), 0, 'Test', 'Reply to [[Thre...', true, '[[User:Nike|Nik...')
#4 /www/ LqtView::replyMetadataUpdates(Array)
#5 [internal function]: ApiThreadAction->actionReply(Array, Array)
#6 /www/ call_user_func_array(Array, Array)
#7 /www/ ApiThreadAction->execute()
#8 /www/ ApiMain->executeAction()
#9 /www/ ApiMain->executeActionWithErrorHandling()
#10 /www/ ApiMain->execute()
#11 {main}

Version: master
Severity: blocker



Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 1:24 AM
bzimport set Reference to bz43693.

At least enotifs are sent only once.

Git bisect found the cause:
b3ff701cba6578ff0994ef3b42efcb1ba4eac9cd is the first bad commit
commit b3ff701cba6578ff0994ef3b42efcb1ba4eac9cd
Author: Alexandre Emsenhuber <>
Date: Wed Dec 26 20:50:38 2012 +0100

Also delete the page information cache when invalidating cache of a non-existing page

Changed the usage of WikiPage::getRevision() to Title::getLatestRevID(), so that
the cache is correctly deleted when the page does not exist and it doesn't need
to create an instance of the WikiPage class to get an already-available value.

Change-Id: Ied4dedd051759503046d5461c640de3490d29c91

:040000 040000 ed1080d2451df48eaa8fec3bab2ae104b776f871 e2b27cdf2e8386fcc52ba21ea4c2c27f46a60610 M includes

My theory:

This causes the above exception happen in the API, but only after the reply has been created. LQT sees the error and falls back to normal submit, which works and two threads are created.

See also for the original LinkCache issue which has been waiting fix for over 6 months now.

[Mid-air collisions...] Marking as blocking wmf8 (merge was after wmf7), done already by Nemo_bis (thanks).

Also tentatively assigning to Alex (though code change happened in Core) and CC'ing more LQT devs.

Gerrit 42535 reverts gerrit 40574.

Change made in comment 5 fixes the issue.