Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memberof is slow on update/fixup if there are several 'groupattr' #5440

Closed
tbordaz opened this issue Sep 8, 2022 · 4 comments
Closed

memberof is slow on update/fixup if there are several 'groupattr' #5440

tbordaz opened this issue Sep 8, 2022 · 4 comments
Labels
In JIRA ticket is in JIRA performance Issue impacts performance priority_high need urgent fix / highly valuable / easy to fix
Milestone

Comments

@tbordaz
Copy link
Contributor

tbordaz commented Sep 8, 2022

Issue Description
Memberof can be configured with several membership attribute (member, uniquemember,..)
When fixing (create memberof values) an entry, memberof plugin searches the groups owning that entry using a filter that contains all the membership attributes. The drawbacks are

  • it mixes the relation, so G2 --member--> G1 -- uniquemember--> U1, then U1.memberof=[G1,G2]
  • it forces the internal search to reevaluate the filter (|(member=U1)(uniquemember=U2) although both attributes are index

Package Version and Platform:
all version

Steps to Reproduce
To be done

Expected results
Fixup is very slow

@tbordaz tbordaz added needs triage The issue will be triaged during scrum priority_high need urgent fix / highly valuable / easy to fix performance Issue impacts performance In JIRA ticket is in JIRA and removed needs triage The issue will be triaged during scrum labels Sep 8, 2022
@tbordaz tbordaz added this to the 1.3.10 milestone Sep 8, 2022
@tbordaz
Copy link
Contributor Author

tbordaz commented Sep 8, 2022

tbordaz added a commit to tbordaz/389-ds-base that referenced this issue Sep 8, 2022
…roupattr'

Bug description:
	Tentative fix to improve memberof fixup
	When there are several groupattr in memberof config
        To fixup an entry we are doing an internal search
	"(|(attr_1=e1)(attr_2=e1)...(attr_n=e1))"
	This is not valid regarding membership relation and in
        addition it prevents the server to shortcut filter evaluation.

Fix description:
	To fixup an entry iterate several internal searches
	"(attr_1=e1)" , then "(attr_2=e1)", then "(attr_n=e1)"

relates: 389ds#5440

Reviewed by:

Platforms tested:
tbordaz added a commit to tbordaz/389-ds-base that referenced this issue Nov 10, 2022
…roupattr'

Bug description:
        When there are several groupattr (attr_1, attr_2,..) in memberof config
        To fixup entry 'e1', memberof does an internal search
        "(|(attr_1=e1)(attr_2=e1)...(attr_n=e1))"
        This is not valid regarding membership relation and in
        addition it prevents the server to bypass the filter evaluation.

Fix description:
        To fixup an entry iterate several internal searches
        "(attr_1=e1)" , then "(attr_2=e1)", then "(attr_n=e1)"

relates: 389ds#5440

Reviewed by: Pierre Rogier, Mark Reynolds, Simon Pichugin (Thanks)
tbordaz added a commit that referenced this issue Nov 10, 2022
…roupattr' (#5455)

Bug description:
        When there are several groupattr (attr_1, attr_2,..) in memberof config
        To fixup entry 'e1', memberof does an internal search
        "(|(attr_1=e1)(attr_2=e1)...(attr_n=e1))"
        This is not valid regarding membership relation and in
        addition it prevents the server to bypass the filter evaluation.

Fix description:
        To fixup an entry iterate several internal searches
        "(attr_1=e1)" , then "(attr_2=e1)", then "(attr_n=e1)"

relates: #5440

Reviewed by: Pierre Rogier, Mark Reynolds, Simon Pichugin (Thanks)
tbordaz added a commit that referenced this issue Nov 10, 2022
…roupattr' (#5455)

Bug description:
        When there are several groupattr (attr_1, attr_2,..) in memberof config
        To fixup entry 'e1', memberof does an internal search
        "(|(attr_1=e1)(attr_2=e1)...(attr_n=e1))"
        This is not valid regarding membership relation and in
        addition it prevents the server to bypass the filter evaluation.

Fix description:
        To fixup an entry iterate several internal searches
        "(attr_1=e1)" , then "(attr_2=e1)", then "(attr_n=e1)"

relates: #5440

Reviewed by: Pierre Rogier, Mark Reynolds, Simon Pichugin (Thanks)
tbordaz added a commit that referenced this issue Nov 10, 2022
…roupattr' (#5455)

Bug description:
        When there are several groupattr (attr_1, attr_2,..) in memberof config
        To fixup entry 'e1', memberof does an internal search
        "(|(attr_1=e1)(attr_2=e1)...(attr_n=e1))"
        This is not valid regarding membership relation and in
        addition it prevents the server to bypass the filter evaluation.

Fix description:
        To fixup an entry iterate several internal searches
        "(attr_1=e1)" , then "(attr_2=e1)", then "(attr_n=e1)"

relates: #5440

Reviewed by: Pierre Rogier, Mark Reynolds, Simon Pichugin (Thanks)
tbordaz added a commit that referenced this issue Nov 10, 2022
…roupattr' (#5455)

Bug description:
        When there are several groupattr (attr_1, attr_2,..) in memberof config
        To fixup entry 'e1', memberof does an internal search
        "(|(attr_1=e1)(attr_2=e1)...(attr_n=e1))"
        This is not valid regarding membership relation and in
        addition it prevents the server to bypass the filter evaluation.

Fix description:
        To fixup an entry iterate several internal searches
        "(attr_1=e1)" , then "(attr_2=e1)", then "(attr_n=e1)"

relates: #5440

Reviewed by: Pierre Rogier, Mark Reynolds, Simon Pichugin (Thanks)
tbordaz added a commit that referenced this issue Nov 10, 2022
…roupattr' (#5455)

Bug description:
        When there are several groupattr (attr_1, attr_2,..) in memberof config
        To fixup entry 'e1', memberof does an internal search
        "(|(attr_1=e1)(attr_2=e1)...(attr_n=e1))"
        This is not valid regarding membership relation and in
        addition it prevents the server to bypass the filter evaluation.

Fix description:
        To fixup an entry iterate several internal searches
        "(attr_1=e1)" , then "(attr_2=e1)", then "(attr_n=e1)"

relates: #5440

Reviewed by: Pierre Rogier, Mark Reynolds, Simon Pichugin (Thanks)
tbordaz added a commit that referenced this issue Nov 10, 2022
…roupattr' (#5455)

Bug description:
        When there are several groupattr (attr_1, attr_2,..) in memberof config
        To fixup entry 'e1', memberof does an internal search
        "(|(attr_1=e1)(attr_2=e1)...(attr_n=e1))"
        This is not valid regarding membership relation and in
        addition it prevents the server to bypass the filter evaluation.

Fix description:
        To fixup an entry iterate several internal searches
        "(attr_1=e1)" , then "(attr_2=e1)", then "(attr_n=e1)"

relates: #5440

Reviewed by: Pierre Rogier, Mark Reynolds, Simon Pichugin (Thanks)
@tbordaz
Copy link
Contributor Author

tbordaz commented Nov 10, 2022

7e701e2..7283a57 main
0ebbb26..78ee3a5 389-ds-base-2.2
8fdbe59..b5e5afb 389-ds-base-2.1
d15a0a7..ef2ec82 389-ds-base-2.0
136fc84..ce0bda6 389-ds-base-1.4.4
620f96f..9ba2cd3 389-ds-base-1.4.3

still fighting for 1.3.10...

tbordaz added a commit that referenced this issue Nov 15, 2022
…roupattr' (#5455)

Bug description:
	When there are several groupattr (attr_1, attr_2,..) in memberof config
	To fixup entry 'e1', memberof does an internal search
	"(|(attr_1=e1)(attr_2=e1)...(attr_n=e1))"
	This is not valid regarding membership relation and in
	addition it prevents the server to bypass the filter evaluation.

Fix description:
	To fixup an entry iterate several internal searches
	"(attr_1=e1)" , then "(attr_2=e1)", then "(attr_n=e1)"

relates: #5440

Reviewed by: Pierre Rogier, Mark Reynolds, Simon Pichugin (Thanks)
@tbordaz
Copy link
Contributor Author

tbordaz commented Nov 15, 2022

d08a0e4..813c8cd 389-ds-base-1.3.10

@tbordaz tbordaz closed this as completed Nov 15, 2022
@droideck
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In JIRA ticket is in JIRA performance Issue impacts performance priority_high need urgent fix / highly valuable / easy to fix
Projects
None yet
Development

No branches or pull requests

2 participants