Project

General

Profile

Actions

Bug #14392

closed

If a rule targets too many groups, policy generation fails

Added by Nicolas CHARLES about 5 years ago. Updated almost 5 years ago.

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

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 1 (0 open1 closed)

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

Updated by Alexis Mousset about 5 years 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
Actions #2

Updated by Alexis Mousset about 5 years ago

  • Description updated (diff)
Actions #3

Updated by Nicolas CHARLES about 5 years 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
Actions #4

Updated by François ARMAND about 5 years ago

  • Target version changed from 4.1.20 to 4.1.21
Actions #6

Updated by François ARMAND about 5 years ago

  • Assignee set to Nicolas CHARLES
Actions #7

Updated by Nicolas CHARLES about 5 years ago

  • Status changed from New to In progress
Actions #8

Updated by Nicolas CHARLES about 5 years 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
Actions #9

Updated by François ARMAND about 5 years 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)
Actions #10

Updated by Nicolas CHARLES about 5 years ago

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

Updated by François ARMAND almost 5 years ago

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

Updated by Vincent MEMBRÉ almost 5 years 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
Actions #13

Updated by Vincent MEMBRÉ almost 5 years 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.

Actions

Also available in: Atom PDF