-
Notifications
You must be signed in to change notification settings - Fork 257
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
SYSDB: perf improvements in sysdb_add_group_member_overrides(), part 3 #7872
base: master
Are you sure you want to change the base?
Conversation
c641274
to
025dcba
Compare
@sumit-bose, @aplopez, I added two tests related patches: (1) 025dcba - since I figured that local override tests were not checking usernames in group members output; |
Got confirmation from @marco-kusa that in their env (#7793) this patch makes lookups blazing fast even with "ignore_group_members = false". |
@alexey-tikhonov Most of these commits are already present in part 2 |
I mentioned this in the PR description:
There is only one patch to be reviewed: "DB: skip sysdb_add_group_member_overrides() completely " |
There are two more conditions that use the |
Now |
Sorry. I didn't understand that when I read it. |
As discussed, Alexei is going to drop the test PR since it's now covered by #7887
My part of the review is no longer relevant.
No, formally speaking we don't. We can still can get there with 'expect_override_dn == false' with 'id_provider == ipa'. Another question is if this exception is justified. It's there because of 'SYSDB_DEFAULT_OVERRIDE_NAME'. I was discussing this with @sumit-bose and didn't fully understand use of 'SYSDB_DEFAULT_OVERRIDE_NAME' so kept ipa as an exception to be on a safe side. This should already provide a huge relief for LDAP and AD providers. We can deal with IPA later. |
Sorry, as the second operator in the condition is an However, the idea of removing the parameter still applies. |
But why? To save stack? This functions is called (and thus arguments created) once per group. |
To make the code clearer because in the end, even if we get this as a parameter, the value ALWAYS depends on the |
For me 'expect_override_dn' is semantically clearer in this context than 'DOM_HAS_VIEWS()'. |
I actually prefer the local variable, which is computed only once and, more important, assigns a meaning (the name) to that value. If, today, you want to know what that parameter comes from, you have to find all the calls to this function and there you will discover that all of them are computed the same way; and with a value that the function already has. So why passing it as a separate argument? |
Ok, added a patch. |
if no view defined and this is not IPA domain.
…rrides()` since it can be deduced from 'domain' argument.
To be dropped
a7e554f
to
f3043d6
Compare
I ran some performance tests and the results are interesting. Setup: 10000 users with private groups. 1 group
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK. Thank you.
(Approved considering the tests will be removed).
(to be rebased on top of #7866)
Since this patch completely skips
sysdb_add_group_member_overrides()
in the setup described in #7841 (comment) (and used for testing in #7866), sure thing it makes lookup ~ x10..15 times faster - 62..82 msec.