Reviewed: https://reviews.mahara.org/8134 Committed: https://git.mahara.org/mahara/mahara/commit/87c2f7ede1fa921f4b7fd282dccdc570f8e30b4c Submitter: Robert Lyon ([email protected]) Branch: 17.10_STABLE
commit 87c2f7ede1fa921f4b7fd282dccdc570f8e30b4c Author: Robert Lyon <[email protected]> Date: Tue Oct 3 11:35:10 2017 +1300 Bug 1720912: Allow easier turning off/on of elasticsearch triggers As part of the db upgrade process. This allows us to turn the triggers off while updating a certain table and turning them on again afterwards. behatnotneeded Change-Id: I5d6f2f7fb7075fca5fe8c811820abe87d92790b3 Signed-off-by: Robert Lyon <[email protected]> (cherry picked from commit 6e9321c77d7ca6fe47066c6c28e6887aa1363971) -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1720912 Title: Better way to disable elasticsearch triggers during upgrade Status in Mahara: Fix Committed Status in Mahara 17.04 series: Fix Committed Status in Mahara 17.10 series: Fix Committed 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_elasticsearch_queue table as well. 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_elasticsearch_trigger($table); and create_elasticsearch_trigger($table); 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 To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1720912/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

