Page MenuHomePhabricator

updateSearchIndex.php needs better error reporting (and possibly better file handling)
Open, Needs TriagePublic

Description

The error reporting from failed writes for the pos files that updateSearchIndex uses and checks could use better error messages to make fixes for problems more discoverable for naive users. Perhaps instead of just "Couldn't write to the searchUpdate.XXX.pos!" the message could read "Please specify -s FILE to give a a writable location for the position file".

Alternatively, if the file isn't writable, the lock time could be set to infinite, a message printed saying what was going to happen, and, after confirmation, the script would continue.

From the support desk:

When I run maintenance/updateSearchIndex.php I get the error

--- Unlocking --
 Done
 *** Couldn't write to the searchUpdate.MyWiki.pos!

Does the maintenance directory needs some write rights?

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

MarkAHershberger raised the priority of this task from to Needs Triage.
MarkAHershberger updated the task description. (Show Details)
MarkAHershberger subscribed.

When I ran into this the first time I couldn't make sense of the error message either.

Change 646965 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/core@master] updateSearchIndex.php: Better handling for file creation

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

Change 646965 abandoned by Ammarpad:

[mediawiki/core@master] updateSearchIndex.php: Better handling for file creation

Reason:

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