Actions
Architecture #17921
openimprove searching in ruddersysevents for the reports in store run agents
Pull Request:
Effort required:
Name check:
To do
Fix check:
To do
Regression:
Description
for the moment, we are doing a
select max(id) as id from RudderSysEvents where id > ${fromId} and executionTimeStamp < before
which is widly inefficient (see https://issues.rudder.io/issues/11147 )
then we do
select distinct T.nodeid, T.executiontimestamp, coalesce(C.keyvalue, '') as nodeconfigid, coalesce(C.iscomplete, false) as complete, T.insertionid from (select nodeid, executiontimestamp, min(id) as insertionid from ruddersysevents where id > ? and id <= ? group by nodeid, executiontimestamp) as T left join (select true as iscomplete, nodeid, executiontimestamp, keyvalue from ruddersysevents where id > ? and id <= ? and eventtype = 'control' and component = 'end' ) as C on T.nodeid = C.nodeid and T.executiontimestamp = C.executiontimestamp
agent run being out of order, we cannot simply take execution timestamp from last id as min execution time - risk is that the node is in the future, and prevent any compliance from a long time
we could have some heuristics:
- take the lowest time from the previous batch considered as the min time where to look from (so we need to store that), minus x minutes
- if the lowest is in the future from current time, take current time -x minutes?
- and even always ensure that there is a minimum from now to the min
of we could have the rudder-relay storing this information in reportsexecution, and skip the first part altogether, and then updating a table with the information of which runs have been updated, and from there have the webapp catchup on these and compute the compliance
Updated by Nicolas CHARLES over 4 years ago
- Tracker changed from Bug to Architecture
- Priority deleted (
0)
Note: rudder-relayd could also store the last run for each node, in a new tale, rather than using the infarious
select r.nodeid, r.date, r.nodeconfigid, r.complete, r.insertionid, c.nodeid, c.nodeconfigid, c.begindate, c.enddate, c.configuration from ( select reportsexecution.nodeid, reportsexecution.date, reportsexecution.nodeconfigid, reportsexecution.complete, reportsexecution.insertionid from reportsexecution where (nodeid, insertionid) in ( select nodeid, max(insertionid) as insertionid from reportsexecution where complete = true and nodeid in """ ++ Fragment.const(s"""(values ${nodes.mkString(",")} )""") ++ fr""" GROUP BY nodeid ) ) as r left outer join nodeconfigurations as c on r.nodeId = c.nodeid and r.nodeconfigid = c.nodeconfigid
Updated by François ARMAND over 4 years ago
- Related to Architecture #17180: Compliance incorrectly computed with old reports or runs not sent in node chronological order added
Updated by Nicolas CHARLES over 4 years ago
- Related to Architecture #16830: nodecompliance and nodecompliancelevels don't contain "no answer" reports added
Updated by Nicolas CHARLES over 4 years ago
- Related to Architecture #15000: While Rudder is fetching changes from the database, it cannot display the compliance for node list added
Updated by Vincent MEMBRÉ about 4 years ago
- Target version changed from 6.2.0~beta1 to 6.2.0~rc1
Updated by François ARMAND about 4 years ago
- Target version changed from 6.2.0~rc1 to 7.0.0~beta1
Updated by Vincent MEMBRÉ over 3 years ago
- Target version changed from 7.0.0~beta1 to 7.0.0~beta2
Updated by Vincent MEMBRÉ about 3 years ago
- Target version changed from 7.0.0~beta2 to 7.0.0~beta3
Updated by Alexis Mousset about 3 years ago
- Target version changed from 7.0.0~beta3 to 7.1.0~beta1
Updated by Vincent MEMBRÉ almost 3 years ago
- Target version changed from 7.1.0~beta1 to 7.1.0~beta2
Updated by Vincent MEMBRÉ almost 3 years ago
- Target version changed from 7.1.0~beta2 to 7.1.0~rc1
Updated by Alexis Mousset over 2 years ago
- Target version changed from 7.1.0~rc1 to 7.2.0~beta1
Updated by Alexis Mousset over 2 years ago
- Target version changed from 7.2.0~beta1 to 7.3.0~beta1
Updated by Vincent MEMBRÉ almost 2 years ago
- Target version changed from 7.3.0~beta1 to 7.3.0~rc1
Updated by Vincent MEMBRÉ almost 2 years ago
- Target version changed from 7.3.0~rc1 to 7.3.0
Updated by Vincent MEMBRÉ over 1 year ago
- Target version changed from 7.3.0 to 7.3.1
Updated by Vincent MEMBRÉ over 1 year ago
- Target version changed from 7.3.1 to 7.3.2
Updated by Vincent MEMBRÉ over 1 year ago
- Target version changed from 7.3.2 to 7.3.3
Updated by Vincent MEMBRÉ over 1 year ago
- Target version changed from 7.3.3 to 7.3.4
Updated by Vincent MEMBRÉ over 1 year ago
- Target version changed from 7.3.4 to 7.3.5
Updated by Alexis Mousset over 1 year ago
- Target version changed from 7.3.5 to 7.3.6
Updated by Vincent MEMBRÉ over 1 year ago
- Target version changed from 7.3.6 to 7.3.7
Updated by Vincent MEMBRÉ over 1 year ago
- Target version changed from 7.3.7 to 7.3.8
Updated by Vincent MEMBRÉ about 1 year ago
- Target version changed from 7.3.8 to 7.3.9
Updated by Vincent MEMBRÉ about 1 year ago
- Target version changed from 7.3.9 to 7.3.10
Updated by Vincent MEMBRÉ about 1 year ago
- Target version changed from 7.3.10 to 7.3.11
Updated by Vincent MEMBRÉ 11 months ago
- Target version changed from 7.3.11 to 7.3.12
Updated by Vincent MEMBRÉ 10 months ago
- Target version changed from 7.3.12 to 7.3.13
Updated by Vincent MEMBRÉ 10 months ago
- Target version changed from 7.3.13 to 7.3.14
Updated by Vincent MEMBRÉ 8 months ago
- Target version changed from 7.3.14 to 7.3.15
Updated by Vincent MEMBRÉ 7 months ago
- Target version changed from 7.3.15 to 7.3.16
Updated by Vincent MEMBRÉ 6 months ago
- Target version changed from 7.3.16 to 7.3.17
Actions