Page MenuHomePhabricator

All LiquidTreads actions done twice
Closed, ResolvedPublic

Description

Creating new threads, posting replies, even deleting.

In the error log I see

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


Version: master
Severity: blocker
URL: https://translatewiki.net/wiki/Special:Contributions/Nike

Details

Reference
bz43693

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 <ialex.wiki@gmail.com>
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 https://bugzilla.wikimedia.org/show_bug.cgi?id=37209 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.