Page MenuHomePhabricator

Fix InnoDB Fulltext Search: Prepend + to each word in the query
ClosedPublic

Authored by mmodell on Oct 13 2016, 8:59 AM.

Details

Maniphest Tasks
T146673: Contention on search phabricator database creating full phabricator outages
Reviewers
Paladox
jcrespo
hashar
Commits
rPHDEP53c6b5383216: Updated git submodules
rPHABab7ec99e899e: Fix InnoDB Fulltext Search: Prepend + to each word in the query
Patch without arc
git checkout -b D413 && curl -L https://phabricator.wikimedia.org/D413?download=true | git apply
Summary

Innodb fulltext search doesn't support altering ft_boolean_syntax
to make queries default to AND instead of OR. This forces boolean
AND matching by prepending + to all words that don't already have
either prefix of '+' or '-'

Refs T146673

Test Plan

Ran several search queries on my test instance of
phabricator and in each case I got sensible results.

This patch is also deployed on http://phab-01.wmflabs.org, testing welcome.

Diff Detail

Repository
rPHAB Phabricator
Branch
wmf/stable
Lint
Lint OK
Unit
Unit Tests OK
Build Status
Buildable 1141
Build 1679: differential-jessieJenkins
Build 1678: arc lint + arc unit

Event Timeline

mmodell updated this revision to Diff 1100.Oct 13 2016, 8:59 AM
mmodell retitled this revision from to Fix InnoDB Fulltext Search: Prepend + to each word in the query.
mmodell updated this object.
mmodell edited the test plan for this revision. (Show Details)
mmodell added a reviewer: jcrespo.
mmodell edited the test plan for this revision. (Show Details)Oct 13 2016, 9:07 AM
mmodell updated the revert plan for this revision. (Show Details)

Note: the build failure is because jenkins isn't set up to handle phabricator's unit test suite. The test suite passed in my dev environment.

Paladox accepted this revision.Oct 13 2016, 9:58 AM
Paladox edited edge metadata.
This revision is now accepted and ready to land.Oct 13 2016, 9:58 AM

Thanks to @Paladox for switching phab-01 to innodb. I'm reindexing now so searches should actually be hitting the innodb search index now.

This change is now cherry-picked on iridium and merged to wmf/stable for the next deploy.

mmodell closed this revision.Oct 13 2016, 6:09 PM