Better way to disable elasticsearch triggers during upgrade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Robert Lyon | ||
17.04 |
Fix Released
|
High
|
Unassigned | ||
17.10 |
Fix Released
|
High
|
Robert Lyon |
Bug Description
Currently if we want to upgrade some of our tables like view, artefact, view_atefact they can take up lots of time/memory if elasticsearch is being used as that has triggers that add info to the search_
And with elasticsearch queue triggers it checks the queue for the item about to be added and only add it if not already there. So if the number of rows to update is 100,000+ each row add/check is slightly slower than the last.
Instead we should just drop the triggers when we do the change and add them back in after and to make this easier we should have a
drop_
and
create_
pair that we can wrap around specific updates that will do the check to see if elasticsearch is being used and do the correct dropping/adding of triggers
no longer affects: | mahara/18.04 |
Need to backport this to 17.04 as there is an update on the view table that causes problems in large sites