Project

General

Profile

Bug #14392

If a rule targets too many groups, policy generation fails

Added by Nicolas CHARLES 3 months ago. Updated about 1 month ago.

Status:
Released
Priority:
N/A
Category:
Performance and scalability
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
Infrequent - complex configurations | third party integrations
Effort required:
Very Small
Priority:
69

Description

With a very very large list of groups in a rules, the historization (part of policy generation) fails because we have a pkey constraint on table rulesgroupjoin (rules id + serialization of groups of rules)
However, this pk creates a btree, that cannot index long text - error is

ERROR:  index row size 3528 exceeds maximum 2712 for index "rulesgroupjoin_pkey" 
ASTUCE : Values larger than 1/3 of a buffer page cannot be indexed.
Consider a function index of an MD5 hash of the value, or use full text indexing.

dropping the pkey solves the issue

alter table rulesgroupjoin drop constraint rulesgroupjoin_pkey;

recreating an index is still necessary for correct perf of historization though:

CREATE INDEX rule_id_group on rulesgroupjoin (rulePkeyId);

Subtasks

Bug #14414: Migration script for 14392 about a rule targetting to many groupsReleasedNicolas CHARLESActions

Associated revisions

Revision 1bd78d33 (diff)
Added by Nicolas CHARLES 3 months ago

Fixes #14392: If rules uses too much groups, policy generation fails because historisation fails

History

#1

Updated by Alexis MOUSSET 3 months ago

  • Subject changed from if rules uses too numerous, policy generation fails because historisation fails to If rules uses too numerous, policy generation fails because historisation fails
#2

Updated by Alexis MOUSSET 3 months ago

  • Description updated (diff)
#3

Updated by Nicolas CHARLES 3 months ago

  • Subject changed from If rules uses too numerous, policy generation fails because historisation fails to If rules uses too much groups, policy generation fails because historisation fails
#4

Updated by François ARMAND 3 months ago

  • Target version changed from 4.1.20 to 4.1.21
#6

Updated by François ARMAND 3 months ago

  • Assignee set to Nicolas CHARLES
#7

Updated by Nicolas CHARLES 3 months ago

  • Status changed from New to In progress
#8

Updated by Nicolas CHARLES 3 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/2150
#9

Updated by François ARMAND 3 months ago

  • Subject changed from If rules uses too much groups, policy generation fails because historisation fails to If rules uses too many groups, policy generation fails
  • Description updated (diff)
#10

Updated by Nicolas CHARLES 3 months ago

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

Updated by François ARMAND about 2 months ago

  • Subject changed from If rules uses too many groups, policy generation fails to If a rule uses too many groups, policy generation fails
#12

Updated by Vincent MEMBRÉ about 1 month ago

  • Subject changed from If a rule uses too many groups, policy generation fails to If a rule targets too many groups, policy generation fails
  • Priority changed from 70 to 69
#13

Updated by Vincent MEMBRÉ about 1 month ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.21, 4.3.11 and 5.0.9 which were released today.

Also available in: Atom PDF