Page MenuHomePhabricator

rebuildtextindex.php does not work with "actor"
Closed, ResolvedPublic

Description

Hi, when we migrated our wikis to actor, we noticed they were failing to rebuild there search index when we ran "rebuildtextindex.php", it would cause a OOM. So we got the sql query which was:

SELECT  rev_id,rev_page,rev_text_id,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,rev_comment AS `rev_comment_text`,NULL AS `rev_comment_data`,NULL AS `rev_comment_cid`,actor_rev_user.actor_user AS `rev_user`,actor_rev_user.actor_name AS `rev_user_text`,temp_rev_user.revactor_actor AS `rev_actor`,rev_content_format,rev_content_model,page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,old_text,old_flags  FROM `revision`,`revision_actor_temp` `temp_rev_user`,`actor` `actor_rev_user`,`page`,`text`    WHERE (page_id BETWEEN 0 AND 499) AND (page_latest = rev_id) AND (rev_text_id = old_id);

We also ran that on the db server which went very crazy. Possibly due to it having "NULL AS"?

I've linked it to actor because as soon as i change the constant back to "MIGRATION_OLD", i can run rebuildtextindex.php.

Im running mw 1.31 and php 7.2

Event Timeline

<tgr> you probably need to change METHOD to METHOD, [], $revQuery['joins']

That indeed fixed the problem!

Change 474794 had a related patch set uploaded (by Paladox; owner: Paladox):
[mediawiki/core@master] Fix support for "actor" in rebuildtextindex.php

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

Change 474796 had a related patch set uploaded (by Reedy; owner: Paladox):
[mediawiki/core@REL1_32] Use $revQuery['joins'] in query in populateSearchIndex

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

Change 474797 had a related patch set uploaded (by Reedy; owner: Paladox):
[mediawiki/core@REL1_31] Use $revQuery['joins'] in query in populateSearchIndex

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

Change 474794 merged by jenkins-bot:
[mediawiki/core@master] Use $revQuery['joins'] in query in populateSearchIndex

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

Change 474796 merged by jenkins-bot:
[mediawiki/core@REL1_32] Use $revQuery['joins'] in query in populateSearchIndex

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

Change 474797 merged by jenkins-bot:
[mediawiki/core@REL1_31] Use $revQuery['joins'] in query in populateSearchIndex

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