Project

General

Profile

Actions

Bug #20310

closed

Method getByRulesCompliance used by API is highly inefficient

Added by Nicolas CHARLES 6 months ago. Updated 5 months ago.

Status:
Released
Priority:
N/A
Category:
Performance and scalability
Target version:
Severity:
User visibility:
Effort required:
Priority:
0

Description

It starts by computing the targets of all groups, and then creates a map of ruleId -> computed-targets-of-said-rules with no answer as a compliance (A)

Then it construct for each rules the ByRuleRuleCompliance (B), but in there it
  1. construct a map of ComponentName, Seq[NodeId, ComponentStatusReports]
  2. use this map to convert to Seq of ByRuleComponentCompliance (without using the map property, could have been a seq)
  3. and in the conversion, it converts a List[NodeId, ValueReports] to a Map[NodeId, List[NodeId, ValueReports]], where it sorts the list by componentName, then takes the value of them, rather than using lightweight version of the list

finally, it concatenates A and B

I'm quite convinced that nothing from A remains after this operation


Related issues

Related to Rudder - Bug #20311: error in compliance computation from the API in 7.0RejectedVincent MEMBRÉActions
Actions #1

Updated by Nicolas CHARLES 6 months ago

  • Status changed from New to In progress
Actions #2

Updated by Nicolas CHARLES 6 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/4017
Actions #3

Updated by Nicolas CHARLES 5 months ago

  • Status changed from Pending technical review to Pending release
Actions #10

Updated by Vincent MEMBRÉ 5 months ago

  • Related to Bug #20311: error in compliance computation from the API in 7.0 added
Actions #12

Updated by Vincent MEMBRÉ 5 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 6.1.18, 6.2.12 and 7.0.0~rc2 which were released today.

Actions

Also available in: Atom PDF