Some cron jobs cause elasticsearch queue to populate when it doesn't need to
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Cecilia Vela Gurovic |
Bug Description
We only record certain information in elasticsearch but we queue things even if unrecorded information changes because we use triggers/procedures on the tables
Example, when the recalculate_quota cron runs it works out what the user quota should be and then updates all the users in usr table that need fixing. This table has a trigger on it so all users needing updating are added to queue to be indexed.
On a big site that can mean thousands of users being indexed. But we don't record quota in elasticsearch so we don't need to index this change.
It would be good to be able to drop/add elasticsearch triggers during cron process for certain cron jobs like we do in upgrade.php script
eg:
drop_
... do cron job ...
create_
Changed in mahara: | |
assignee: | nobody → Cecilia Vela Gurovic (ceciliavg) |
Changed in mahara: | |
status: | Confirmed → In Progress |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
These cron jobs update tables with ES triggers, but don't need to trigger them:
core cron jobs data_daily - updates 'site_data', 'view_visit', 'view' tries_to_ zero - updates 'usr'
recalculate_quota - updates tables 'usr' and 'group'
cron_site_
user_login_
interaction plugin cron forum_new_ post - 'interaction_ forum_post' sets sent=1
interaction_