[autobackport: sssd-2-9] memberOf plugin: avoid ldb_dn_compare() in mbof_append_addop()#8559
Conversation
There was a problem hiding this comment.
Code Review
This pull request moves the sss_linearized_dn_match function to an earlier position in src/ldb_modules/memberof.c and updates mbof_append_addop to use it for DN comparisons instead of ldb_dn_compare. It also introduces a null check for the linearized DN to improve robustness. I have no feedback to provide.
|
The pull request was accepted by @alexey-tikhonov with the following PR CI status: 🟢 CodeQL (success) There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging. |
87e0256 to
4c7abf9
Compare
This is an automatic backport of PR#8546 memberOf plugin: avoid
ldb_dn_compare()inmbof_append_addop()to branch sssd-2-9, created by @alexey-tikhonov.Please make sure this backport is correct.
Note
The commits were cherry-picked without conflicts.
You can push changes to this pull request
Original commits
2dcdca2 - memberOf plugin: avoid
ldb_dn_compare()inmbof_append_addop()Backported commits
ldb_dn_compare()inmbof_append_addop()Original Pull Request Body
Justification is the same as in 704c31d
In certain scenarios this function is a hot path and using heavy
ldb_dn_compare()adds unnecessary overhead.Testing with a following setup: 50 mid-level groups that all share the same 2500 leaf groups as members, plus one top-level group containing all mid-level groups. Each leaf group contains a single user.
ignore_group_members = false.time id userwith a cold cache:mbof_append_addop()accounts for ~35%mbof_append_addop()accounts for ~18%i.e. this patch makes
mbof_append_addop()approx x2 faster (this gain doesn't depend on number of groups; but weight ofmbof_append_addop()in total consumption depends on it)