Actions
Bug #8423
closedWhen updating a Rudder install, changes_executionTimeStamp_idx index is not created
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:
Description
The index that allows to get changes by rules is not created when migrating a Rudder instance. So, getting changes is extremelly slow.
Typically, if you are seing warning message: "[Store Agent Run Times] Task frequency is set too low! Last task took xxxx ms but tasks are scheduled every yyy ms.", you might missing that index.
The real diagnosis is on psql command line (after a psql -u rudder etc):
rudder=> \d ruddersysevents [...table details....] Indexes: "ruddersysevents_pkey" PRIMARY KEY, btree (id) => "changes_executiontimestamp_idx" btree (executiontimestamp) WHERE eventtype::text = 'result_repaired'::text "component_idx" btree (component) "composite_node_execution_idx" btree (nodeid, executiontimestamp) "executiontimestamp_idx" btree (executiontimestamp) "keyvalue_idx" btree (keyvalue) "nodeid_idx" btree (nodeid) "ruleid_idx" btree (ruleid) [...other info...]
So, we need to add a migration script to create that index.
Woraround: you can create the index by hand. When connected to Rudder db with psql, execute following query:
CREATE INDEX changes_executionTimeStamp_idx ON RudderSysEvents (executionTimeStamp) WHERE eventType = 'result_repaired';
Actions