Project

General

Profile

Bug #15798

Rationalize the handling of variables during policy generation

Added by Nicolas CHARLES 4 months ago. Updated about 2 months ago.

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

Description

During a policy generation, we are moving around a lot of data, and some part ought to be rationalized (and even understood better)

Most notably, in prepareVariables, for each nodes and each policies, we are
  • getting all variables of the policy
  • checking these variables, and constructing new variables based on them
  • for each of these variable, we are constructing an STVariable
  • getting the escaping method for this node
  • escaping the variable value based on this escaping method

We could easily get only once the escaping method for the node (this is done 6194231 times on a generation with 4500 nodes, and 1.5 millions control point), and skip the middle man and create directly the STVariable from the checked Variable

Also, policy.mergeVars looks now quite dubious

Associated revisions

Revision f3ec4538 (diff)
Added by Nicolas CHARLES 4 months ago

Fixes #15798: Rationalize the handling of variable during a policy generation

Revision 4754090c (diff)
Added by Nicolas CHARLES 2 months ago

fixup ! Fixes #15798: Rationalize the handling of variable during a policy generation

Co-Authored-By: Francois Armand <>

History

#1

Updated by Nicolas CHARLES 4 months ago

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES
#2

Updated by Nicolas CHARLES 4 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/2485
#3

Updated by François ARMAND 4 months ago

We will assess the interest of that PR in next minor.

#4

Updated by Vincent MEMBRÉ 4 months ago

  • Target version changed from 5.0.14 to 5.0.15
#5

Updated by Nicolas CHARLES 2 months ago

  • Status changed from Pending technical review to Pending release
#7

Updated by Alexis MOUSSET 2 months ago

  • Subject changed from Rationalize the handling of variable during a policy generation to Rationalize the handling of variables during policy generation
#10

Updated by Vincent MEMBRÉ about 2 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 5.0.15 which was released today.

Also available in: Atom PDF