-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
Improve LDAP performances when updating records, especially when many user entries exists #1975
base: dev
Are you sure you want to change the base?
Conversation
Not sure about your last commits on |
# If the requested mail address is already as main address or as an alias by this user | ||
if mail in user["mail"]: | ||
user["mail"].remove(mail) | ||
if mail != user["mail"][0]: | ||
user["mail"].remove(mail) |
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.
Not sure to fully understand that bit but my brain is not super fresh right now
if mail in user["mail"]: | ||
user["mail"].remove(mail) | ||
continue |
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.
Also not sure to understand this bit
Co-authored-by: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com>
1e1e80f
to
c7e99af
Compare
Tests are ok on my local setup, but on the CI @alexAubin @Axolotle : Is it possible that SSE and work on moulinette could have triggered this error ? |
The problem
With 150 users and 12 apps, a
yunohost user create
take 1minWith 350 users and ~25 apps, a
yunohost user create
take hours maybe days.Solution
Replace
ldap.modlist.modifyModlist
by an optimize code that work for yunohost.Test in a dev platforme (with ssd 600Mbps) : the 169th user creation is made in ~3s.
PR Status
Need more test to be sure it doesn't break something...
How to test