HomePhabricator

Don't report search indexing errors to the daemon log except from "bin/search…

Description

Don't report search indexing errors to the daemon log except from "bin/search index"

Summary:
Depends on D20177. Fixes T12425. See https://discourse.phabricator-community.org/t/importing-libphutil-repository-on-fresh-phabricator-triggers-an-error/2391/.

Search indexing currently reports failures to load objects to the log. This log is noisy, not concerning, not actionable, and not locally debuggable (it depends on the reporting user's entire state).

I think one common, fully legitimate case of this is indexing temporary files: they may fully legitimately be deleted by the time the indexer runs.

Instead of sending these errors to the log, eat them. If users don't notice the indexes aren't working: no harm, no foul. If users do notice, we'll run or have them run bin/search index as a first diagnostic step anyway, which will now report an actionable/reproducible error.

Test Plan:

  • Faked errors in both cases (initial load, re-load inside the locked section).
  • Ran indexes in strict/non-strict mode.
  • Got exception reports from both branches in strict mode.
  • Got task success without errors in both cases in non-strict mode.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T12425

Differential Revision: https://secure.phabricator.com/D20178