Repository navigation
fix retrieval of group members and cache group members - #11494
Conversation
|
Please test/review @Xenopathic @PVince81 @craigpg @jnfrmarks |
|
Will you find caleb_homenick without the patch? No local users included? With my test group (49 users) and without the patch the search for "oo" runs over 10 minutes and results in 0 entries (3 expected). With the patch it returns the correct results in 4 seconds. |
|
I'm confused by what the correct results are supposed to look like. If the problem was not finding the user at all (given enough input text to narrow it down), then I think we're ok. However, if the problem is that select menu created by partial text doesn't include the right number of users and/or if that list is not ordered correctly, then finding the user might be confusing. The screenshots above are both valid in that they match the substring criteria (both were limited to 15 users, is that intentional?), but that patched menu (and its ordering) is matching the substring anywhere while the unpatched is matching the substring at the start of the string. I've yet to see anything take 5+ minutes, so it's likely I'm not understanding the use case well enough to reproduce. |
|
Did some more testing and this looks good. +1 We should consider adding tests to verify we're hitting the cache (and not hitting ldap) as expected. |
|
That's all Jenkins tells me:
Guess, this is OK in fact? @DeepDiver1975 |
|
I tried the following: have a group with about 1400 zombies inside. When sharing with that group, the share.php call takes:
The difference is not significant. From what i heard from @butonic on IRC he seemed to have much more but also got similar results, without significant difference. Since many hours have already gone into testing this, and @blizzz and @craigpg tested it and confirmed the improvement, and the code looks good, I suggest to merge 👍 |
|
💣 Test FAILed. 💣 Build result: FAILUREGitHub pull request #11494 of commit 2017d7e automatically merged.Building remotely on vm-slave-02 (SLAVE) in workspace /var/jenkins/workspace/pull-request-analyser-ng-simple@7 > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10Fetching upstream changes from https://github.com/owncloud/core.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/11494/merge^{commit} # timeout=10Checking out Revision 267b4b4039a48b1f7e643b9fcf137fd12a5aa6e5 (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f 267b4b4039a48b1f7e643b9fcf137fd12a5aa6e5 > git rev-list fdd52d3e9a3cb630a802919fdc3d4da2e8f2069f # timeout=10 > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » vm-slave-02Configuration pull-request-analyser-ng-simple » vm-slave-02 is still in the queue: Waiting for next available executor on vm-slave-02pull-request-analyser-ng-simple » vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 5 minutes💣 Test FAILed. 💣 |
|
@blizzz This would prevent a ldap substring search on a single character (e.g. displayName=a) and would give the user a little time to correct their typos instead of sending a request as each character is entered. @butonic, @PVince81 To test, you can use ldapsearch: |
|
@craigpg yes, agreed, i suggested it in another github issue, was waiting for a comment by @schiesbn. alas, i am don't know by heard in which issue it was. |
|
@blizzz, can we get the autocomplete change in before the merge? We can investigate the other performance issues separately. |
|
Ok, after a lot of fiddeling with the LDAP setup (nothing new here) I can see the other members of my group (~300 users) after ~22sec. I have ~30k users in 100 groups, of which only members of 10 groups are enabled in OC. on master the search hasnt finished after 5 min and timeouts. so 👍 from me |
|
@owncloud-bot retest this please |
|
ty @butonic |
|
@owncloud-bot retest this please |
|
afterwards we merge |
Have seen this just now. I would like to have @schiesbn opinion and also @jancborchardt about the min required amount of characters to trigger search |
|
I'd agree, but let's do it in a separate PR. This one lived long enough... Also, @blizzz please rebase |
|
💣 Test FAILed. 💣 Build result: FAILURE[...truncated 2 lines...] > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10Fetching upstream changes from https://github.com/owncloud/core.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse 2017d7e^{commit} # timeout=10Checking out Revision 2017d7e (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f 2017d7e > git rev-list bf9127aa2c2a085d0e0157eff764684a2d7e3ed4 # timeout=10First time build. Skipping changelog. > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » vm-slave-02Configuration pull-request-analyser-ng-simple » vm-slave-02 is still in the queue: Waiting for next available executor on vm-slave-02pull-request-analyser-ng-simple » vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 4 second💣 Test FAILed. 💣 |
|
I have no objections against the suggestion regarding auto complete, I think it makes sense to have a delay here. I leave it to you if you want to add it to this PR or create a new PR for it. Probably I doesn't make much sense to wait for Jenkins at the moment, my suggestion: rebase and merge it if the tests run on your local system. |
|
Well, Jenkins sees 2 failing tests. I rebase and look after it. |
2017d7e to
7ff7a49
Compare
|
And those tests were failing, because they were not adjusted according to the changes in the group manager. Should be resolved now, at least locally. |
|
The inspection completed: 7 new issues, 4 updated code elements |
|
💣 Test FAILed. 💣 Build result: FAILUREGitHub pull request #11494 of commit 7ff7a49 automatically merged.Building remotely on vm-slave-02 (SLAVE) in workspace /var/jenkins/workspace/pull-request-analyser-ng-simple > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10Fetching upstream changes from https://github.com/owncloud/core.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/11494/merge^{commit} # timeout=10Checking out Revision 3d76a4ef88fe64a5b74147c5751d56b0e6beb74f (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f 3d76a4ef88fe64a5b74147c5751d56b0e6beb74f > git rev-list 79bf2d27cc62cdaed8a9dfa63620af105eaa31b2 # timeout=10First time build. Skipping changelog. > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » vm-slave-02pull-request-analyser-ng-simple » vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 3 second💣 Test FAILed. 💣 |
|
Now Jenkins is kidding me. It says it tested the latest commit, but the console output indicates it has an older code state (otherwise the fail messages really cannot happen). Tests succeed locally. |
|
@owncloud-bot Retest this please. |
|
🚀 Test PASSed. 🚀 |
fix retrieval of group members and cache group members
|
Since you confirmed a less severe PR to be backported, i assume i am allowed to do it here as well, @karlitschek |
fix retrievel of group members and cache group members fix changed variable name with several backends, more than limit can be returned make performance less bad. Still far from good, but at least it works add one simple cache test adjust group manager tests
|
Sure. Risk should be ok so please backport |
fix retrievel of group members and cache group members fix changed variable name with several backends, more than limit can be returned make performance less bad. Still far from good, but at least it works add one simple cache test adjust group manager tests Conflicts: apps/user_ldap/group_ldap.php apps/user_ldap/lib/access.php apps/user_ldap/tests/group_ldap.php
|
and backport to stable6 is here: e46f87f |



replaces #11161
This is the missing piece to fix #10513 for LDAP users.
Please review! Please mind, the performance is not very lovely on a big LDAP setup, but i brought it down from over 40 to less than 10s with a huge user base (OpenLDAP). Getting group memberships is the expensive part here. At least it works… Testing with AD is also yet necessary.