Page MenuHomePhabricator

Orphaned linkrecommendation search index entries on beta cswiki
Closed, ResolvedPublic

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Checking the first 10 link recommendations, 2 work, 8 show the error dialog. Of the 8 one has been edited (so maybe it's a case of not updating the search index), the other 7 haven't so there isn't any obvious reason for the DB row to not be present.

IIRC the maintenance/fixLinkRecommendationData.php script had some consistency issues in its first incarnation (as did refreshLinkRecommendations.php), maybe we should remove all DB and search entries and start over?

(Beta has 447 tasks right now, it had 421 when I set up link recommendations there and there were no such issues then, so this is not a case of new entries added in some incorrect way; functional recommendations broke somehow.)

kostajh added a subscriber: RHo.

IIRC the maintenance/fixLinkRecommendationData.php script had some consistency issues in its first incarnation (as did refreshLinkRecommendations.php), maybe we should remove all DB and search entries and start over?

I think both of those worked correctly at the time when I ran them on beta; and in any case we did not have a noticeable amount of broken tasks then.

MariaDB [cswiki]> select count(*) from growthexperiments_link_recommendations;
+----------+
| count(*) |
+----------+
|      146 |
+----------+
1 row in set (0.00 sec)
kostajh triaged this task as Medium priority.Apr 20 2021, 2:00 PM
kostajh moved this task from Backlog to April 19 - April 23 on the Add-Link board.

@Tgr sounds like you're looking into it this week; feel free to bump the priority if you think it should be done ahead of other things. (Unexpected disappearances of recommendations from the DB does sound like it's worth investigating sooner rather than later.)

Change 681405 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] [WIP] Fix link recommendation SearchDataForIndex handler

https://gerrit.wikimedia.org/r/681405

Tgr raised the priority of this task from Medium to High.
Tgr edited projects, added Growth-Team (Sprint 0 (Growth Team)); removed Growth-Team.

Yeah, the logic for deleting recommendations is badly broken.

Change 681405 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Fix link recommendation SearchDataForIndex handler

https://gerrit.wikimedia.org/r/681405

Change 681405 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Fix link recommendation SearchDataForIndex handler

https://gerrit.wikimedia.org/r/681405

@Tgr with that patch merged, what's the next step? Re-run refreshLinkRecommendations and/or the fixLinkRecommendationData script?

Yes, run fixLinkRecommendationData to remove the affected pages from the search index (since refreshLinkRecommendations relies on the index for finding candidates with no recommendation) and then run refreshLinkRecommendations to recreate the DB entry and re-add to the index.

...although with the cronjobs on beta now fixed, refreshLinkRecommendations is running automatically anyway, so running the other one should suffice.

OK, I've just run mwscript extensions/GrowthExperiments/maintenance/fixLinkRecommendationData.php --wiki=cswiki --search-index.

Done; spot-tested on cswiki and 10 out of 10 tasks work now.

I don't think this is directly QA-able so I'll just close it.

(Sorry, looks like we've been working in parallel. I forgot to refresh the task before commenting.)

Change 778628 had a related patch set uploaded (by Umherirrender; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@REL1_36] Fix link recommendation SearchDataForIndex handler

https://gerrit.wikimedia.org/r/778628

Change 778628 merged by Umherirrender:

[mediawiki/extensions/GrowthExperiments@REL1_36] Fix link recommendation SearchDataForIndex handler

https://gerrit.wikimedia.org/r/778628